Documentation
¶
Index ¶
- type Vertexes
- func (v *Vertexes) AddNeighbor(vertex *Vertexes)
- func (v *Vertexes) Decrement()
- func (v *Vertexes) Degree() int
- func (v *Vertexes) Equal(vertex Vertexes) bool
- func (v *Vertexes) FirstNeighbor() *Vertexes
- func (v *Vertexes) HasNeighbor(vertex Vertexes) bool
- func (v *Vertexes) ID() uint64
- func (v *Vertexes) Increment()
- func (v *Vertexes) Label() string
- func (v *Vertexes) Name() string
- func (v *Vertexes) NeighborCount() int
- func (v *Vertexes) Neighbors() []*Vertexes
- func (v *Vertexes) RemoveNeighbor(vertex Vertexes)
- func (v *Vertexes) SetID(id uint64)
- func (v *Vertexes) SetName(name string)
- func (v *Vertexes) SetValue(value int)
- func (v *Vertexes) SortNeighbors()
- func (v *Vertexes) Value() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Vertexes ¶ added in v0.0.13
type Vertexes struct {
// contains filtered or unexported fields
}
Vertexes implements a graph vertex
func (*Vertexes) AddNeighbor ¶ added in v0.0.13
AddNeighbor adds a neighbor vertex
func (*Vertexes) Decrement ¶ added in v0.0.13
func (v *Vertexes) Decrement()
Decrement decrements the vertex value by 1
func (*Vertexes) Degree ¶ added in v0.0.13
Degree returns the degree of the incoming edges (loops count as 2)
func (*Vertexes) Equal ¶ added in v0.0.13
Equal returns true if v and vertex represent the same vertex
func (*Vertexes) FirstNeighbor ¶ added in v0.0.13
FirstNeighbor returns the first neighbor
func (*Vertexes) HasNeighbor ¶ added in v0.0.13
HasNeighbor returns true if the given vertex is already a neighbor
func (*Vertexes) Increment ¶ added in v0.0.13
func (v *Vertexes) Increment()
Increment increments the vertex value by 1
func (*Vertexes) NeighborCount ¶ added in v0.0.13
NeighborCount returns the number of edges (neighbors)
func (*Vertexes) RemoveNeighbor ¶ added in v0.0.13
RemoveNeighbor removes a neighbor vertex
func (*Vertexes) SetID ¶ added in v0.0.13
SetID sets the id of the vertex (use with extreme caution)
func (*Vertexes) SortNeighbors ¶ added in v0.0.13
func (v *Vertexes) SortNeighbors()
SortNeighbors returns a sorted slice of all neighbors
Click to show internal directories.
Click to hide internal directories.