diagram

package
v0.0.0-...-863c5c1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DFM_nodeAtt        = map[string]string{"shape": "circle", "label": "\"\""}
	DFM_edgeAtt        = map[string]string{"arrowhead": "none", "len": "0.5"}
	DFM_factAtt        = map[string]string{"shape": "plain", "root": "true"}
	DFM_descriptiveAtt = map[string]string{"shape": "underline"}
	DFM_optionalAtt    = map[string]string{"arrowhead": "icurve"}
	DFM_hierarchyAtt   = map[string]string{"arrowhead": "none"}
)

Attributes are maps of attributes for modifying nodes and edges in the dfm schema.

View Source
var (
	NN_nodeAtt    = map[string]string{"shape": "circle", "label": "\"\""}
	NN_connectAtt = map[string]string{"arrowhead": "none"}
)

Attributes are maps of attributes for modifying nodes and edges in the nn schema.

View Source
var (
	STR_factAtt = map[string]string{"shape": "plaintext", "root": "true"}
	STR_edgeAtt = map[string]string{"arrowhead": "none"}
)

Attributes are maps of attributes for modifying nodes and edges in the star schema.

Functions

This section is empty.

Types

type Dfm

type Dfm struct {
	Graph *gographviz.Graph //graph
}

Struct Dfm defines the star schema and includes a pointer to a graph.

func NewDFM

func NewDFM() *Dfm

Function NewDFM creates a new Dfm object for creating the dfm schema.

func (*Dfm) AddConvergence

func (schema *Dfm) AddConvergence(label string, attach string)

Function AddConvergence adds a convergence node in the schema

func (*Dfm) AddDescriptive

func (schema *Dfm) AddDescriptive(label string, to string)

Function AddDescriptive adds a descriptive node in the schema

func (*Dfm) AddDimension

func (schema *Dfm) AddDimension(label string, attach string)

Function AddDimension adds a dimension in the schema

func (*Dfm) AddHierarchy

func (schema *Dfm) AddHierarchy(labels string, from string, to string)

Function AddHierarchy adds a hyerarchy node in the schema

func (*Dfm) AddOptional

func (schema *Dfm) AddOptional(label string, attach string)

Function AddOptional adds an optional node in the schema

func (*Dfm) AddSequenceDescriptive

func (schema *Dfm) AddSequenceDescriptive(labels string, to string)

Function AddSequenceDescriptive adds a sequence of descreptive nodes in the schema

func (*Dfm) AddSequenceDimension

func (schema *Dfm) AddSequenceDimension(labels string, startAttach string)

Function AddSequenceDimension adds a sequence of dimensions in the schema

func (*Dfm) CreateFact

func (schema *Dfm) CreateFact(title string, attributes string) *Fact

Function CreateFact creates a new Fact object and renders the fact in the schema

func (*Dfm) RenderDiagram

func (schema *Dfm) RenderDiagram()

Function RenderDiagram renders the entire schema to a dot file

func (*Dfm) RenderFact

func (schema *Dfm) RenderFact(f *Fact)

Function RenderFact renders a given fact in the schema.

type Dimension

type Dimension struct {
	// contains filtered or unexported fields
}

Struct Dimension defines a dimension and includes a name, keys, and attributes.

type Fact

type Fact struct {
	// contains filtered or unexported fields
}

Struct Fact defines a fact and includes a name and atrributes.

type Layer

type Layer struct {
	// contains filtered or unexported fields
}

type NN

type NN struct {
	Graph *gographviz.Graph
	// contains filtered or unexported fields
}

Struct NN defines the neural network schema and includes a pointer to a graph.

func NewNN

func NewNN() *NN

Function NewNN creates a new NN object for creating the nn schema.

func (*NN) ConnectLayers

func (schema *NN) ConnectLayers(src *Layer, dst *Layer)

Function ConnectLayers, connect two layers

func (*NN) CreateHiddenLayer

func (schema *NN) CreateHiddenLayer(name string, nums_node int) *Layer

Function CreateHiddenLayer, adds an hidden layer in the nn schema

func (*NN) CreateInputLayer

func (schema *NN) CreateInputLayer(name string, nums_node int) *Layer

Function CreateInputLayer, adds the input layer in the nn schema

func (*NN) CreateOutputLayer

func (schema *NN) CreateOutputLayer(name string, nums_node int) *Layer

Function CreateOutputLayer, creates the output layer in the nn schema

func (*NN) RenderDiagram

func (schema *NN) RenderDiagram()

Function RenderDiagram renders the entire schema to a dot file

type Str

type Str struct {
	Graph *gographviz.Graph
	// contains filtered or unexported fields
}

Struct Str defines the star schema and includes a pointer to a graph, a map of colors, and an index for the color array.

func NewSTR

func NewSTR() *Str

Function NewSTR creates a new Str object for creating the star schema.

func (*Str) CreateDimension

func (schema *Str) CreateDimension(name string, keys string, attributes string) *Dimension

Function CreateDimension creates a new Dimension object and renders the dimension in the schema.

func (*Str) JoinDimension

func (schema *Str) JoinDimension(d1 *Dimension, d2 *Dimension, portKey string)

Function JoinDimension joins two dimensions by a portkey.

func (*Str) RenderDiagram

func (schema *Str) RenderDiagram()

Function RenderDiagram renders the entire schema to a dot file.

func (*Str) RenderDimension

func (schema *Str) RenderDimension(dim *Dimension)

Function RenderDimension renders a given dimension in the schema.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL