Documentation
¶
Overview ¶
Package adjls provides graph implementations as adjacency matrix.
Index ¶
- type DBitmap
- func (g *DBitmap) DelEdge(u, v groph.VIdx)
- func (g *DBitmap) EachEdge(onEdge groph.VisitEdgeW[bool]) error
- func (g *DBitmap) EachIn(to groph.VIdx, onSource groph.VisitVertex) error
- func (g *DBitmap) EachLeaf(onEdge groph.VisitVertex) error
- func (g *DBitmap) EachOut(from groph.VIdx, onDest groph.VisitVertex) error
- func (g *DBitmap) EachRoot(onEdge groph.VisitVertex) error
- func (g *DBitmap) Edge(u, v groph.VIdx) bool
- func (g *DBitmap) InDegree(v groph.VIdx) int
- func (m *DBitmap) Init(flag bool) *DBitmap
- func (g *DBitmap) IsEdge(w bool) bool
- func (g *DBitmap) LeafCount() int
- func (g *DBitmap) NotEdge() bool
- func (m *DBitmap) Order() int
- func (g *DBitmap) OutDegree(v groph.VIdx) int
- func (m *DBitmap) Reset(order int)
- func (g *DBitmap) RootCount() int
- func (g *DBitmap) SetEdge(u, v groph.VIdx, w bool)
- func (g *DBitmap) Size() int
- type Directed
- func (g *Directed[W]) DelEdge(u, v groph.VIdx)
- func (g *Directed[W]) EachEdge(onEdge groph.VisitEdgeW[W]) error
- func (g *Directed[W]) EachIn(to groph.VIdx, onSource groph.VisitVertex) error
- func (g *Directed[W]) EachLeaf(onEdge groph.VisitVertex) error
- func (g *Directed[W]) EachOut(from groph.VIdx, onDest groph.VisitVertex) error
- func (g *Directed[W]) EachRoot(onEdge groph.VisitVertex) error
- func (g *Directed[W]) Edge(u, v groph.VIdx) W
- func (g *Directed[W]) InDegree(v groph.VIdx) int
- func (g *Directed[W]) IsEdge(w W) bool
- func (g *Directed[W]) LeafCount() int
- func (g *Directed[W]) NotEdge() W
- func (m *Directed) Order() int
- func (g *Directed[W]) OutDegree(v groph.VIdx) int
- func (g *Directed[W]) Reset(order int)
- func (g *Directed[W]) RootCount() int
- func (g *Directed[W]) SetEdge(u, v groph.VIdx, w W)
- func (g *Directed[W]) Size() (s int)
- type Undirected
- func (g *Undirected[W]) Degree(v groph.VIdx) int
- func (g *Undirected[W]) DelEdge(u, v groph.VIdx)
- func (g *Undirected[W]) DelEdgeU(u, v groph.VIdx)
- func (g *Undirected[W]) EachAdjacent(of groph.VIdx, onNeighbour groph.VisitVertex) error
- func (g *Undirected[W]) EachEdge(onEdge groph.VisitEdgeW[W]) error
- func (g *Undirected[W]) Edge(u, v groph.VIdx) W
- func (g *Undirected[W]) EdgeU(u, v groph.VIdx) W
- func (g *Undirected[W]) IsEdge(w W) bool
- func (g *Undirected[W]) NotEdge() W
- func (m *Undirected) Order() int
- func (g *Undirected[W]) Reset(order int)
- func (g *Undirected[W]) SetEdge(u, v groph.VIdx, w W)
- func (g *Undirected[W]) SetEdgeU(u, v groph.VIdx, w W)
- func (g *Undirected[W]) Size() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBitmap ¶
type DBitmap struct {
// contains filtered or unexported fields
}
AdjMxDbitmap implements WGraph[bool] as a bitmap based adjacency matrix. Compared to AdjMxbool, this sacrifices runtime performance for lesser memory usage.
func NewDBitmap ¶
type Directed ¶
type Directed[W comparable] struct { // contains filtered or unexported fields }
func AsDirected ¶
func AsDirected[W comparable](reuse *Directed[W], notEdge W, weights ...W) (*Directed[W], error)
func NewDirected ¶
func NewDirected[W comparable](order int, notEdge W, reuse *Directed[W]) *Directed[W]
type Undirected ¶
type Undirected[W comparable] struct { // contains filtered or unexported fields }
func NewUndirected ¶
func NewUndirected[W comparable](order int, notEdge W, reuse *Undirected[W]) *Undirected[W]
func (*Undirected[W]) DelEdge ¶
func (g *Undirected[W]) DelEdge(u, v groph.VIdx)
func (*Undirected[W]) DelEdgeU ¶
func (g *Undirected[W]) DelEdgeU(u, v groph.VIdx)
func (*Undirected[W]) EachAdjacent ¶
func (g *Undirected[W]) EachAdjacent(of groph.VIdx, onNeighbour groph.VisitVertex) error
func (*Undirected[W]) EachEdge ¶
func (g *Undirected[W]) EachEdge(onEdge groph.VisitEdgeW[W]) error
func (*Undirected[W]) Edge ¶
func (g *Undirected[W]) Edge(u, v groph.VIdx) W
func (*Undirected[W]) EdgeU ¶
func (g *Undirected[W]) EdgeU(u, v groph.VIdx) W
func (*Undirected[W]) IsEdge ¶
func (g *Undirected[W]) IsEdge(w W) bool
func (*Undirected[W]) NotEdge ¶
func (g *Undirected[W]) NotEdge() W
func (*Undirected[W]) Reset ¶
func (g *Undirected[W]) Reset(order int)
func (*Undirected[W]) SetEdge ¶
func (g *Undirected[W]) SetEdge(u, v groph.VIdx, w W)
func (*Undirected[W]) SetEdgeU ¶
func (g *Undirected[W]) SetEdgeU(u, v groph.VIdx, w W)
func (*Undirected[W]) Size ¶
func (g *Undirected[W]) Size() int
Click to show internal directories.
Click to hide internal directories.