Back to godoc.org
gorgonia.org/gorgonia/internal/encoding

package encoding

v0.9.10
Latest Go to latest
Published: Apr 10, 2020 | License: Apache-2.0 | Module: gorgonia.org/gorgonia

Index

Variables

var (
	// UndefinedCluster ...
	UndefinedCluster = NewGroup("UndefinedCluster")
	// ExprGraphCluster is the default cluster
	ExprGraphCluster = NewGroup("ExprGraphCluster ")
	// ConstantCluster is the group of nodes that represents constants
	ConstantCluster = NewGroup("Constants ")
	// InputCluster is the group of nodes that are expecting values
	InputCluster = NewGroup("Inputs ")
	// GradientCluster ...
	GradientCluster = NewGroup("Gradients ")
	// StrayCluster ...
	StrayCluster = NewGroup("Undifferentiated nodes ")
)

type Group

type Group struct {
	ID        int
	IsPrimary bool
	Name      string
}

Group represent a cluster of elements

func NewGroup

func NewGroup(name string) Group

NewGroup creates a new group with a generated ID

type Grouper

type Grouper interface {
	Groups() Groups
}

Grouper is any object that can claim itself as being part of a group

type Groups

type Groups []Group

Groups is a bag of groups

func (*Groups) Have

func (g *Groups) Have(grp Group) bool

Have returns true if GroupID is in groups

func (*Groups) Upsert

func (g *Groups) Upsert(grp Group)

Upsert the GroupID in the groups

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier