adjmtx

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package adjls provides graph implementations as adjacency matrix.

Index

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

func NewDBitmap(order int, reuse *DBitmap) *DBitmap

func (*DBitmap) DelEdge

func (g *DBitmap) DelEdge(u, v groph.VIdx)

func (*DBitmap) EachEdge

func (g *DBitmap) EachEdge(onEdge groph.VisitEdgeW[bool]) error

func (*DBitmap) EachIn

func (g *DBitmap) EachIn(to groph.VIdx, onSource groph.VisitVertex) error

func (*DBitmap) EachLeaf

func (g *DBitmap) EachLeaf(onEdge groph.VisitVertex) error

func (*DBitmap) EachOut

func (g *DBitmap) EachOut(from groph.VIdx, onDest groph.VisitVertex) error

func (*DBitmap) EachRoot

func (g *DBitmap) EachRoot(onEdge groph.VisitVertex) error

func (*DBitmap) Edge

func (g *DBitmap) Edge(u, v groph.VIdx) bool

func (*DBitmap) InDegree

func (g *DBitmap) InDegree(v groph.VIdx) int

func (*DBitmap) Init

func (m *DBitmap) Init(flag bool) *DBitmap

func (*DBitmap) IsEdge

func (g *DBitmap) IsEdge(w bool) bool

func (*DBitmap) LeafCount

func (g *DBitmap) LeafCount() int

func (*DBitmap) NotEdge

func (g *DBitmap) NotEdge() bool

func (*DBitmap) Order

func (m *DBitmap) Order() int

func (*DBitmap) OutDegree

func (g *DBitmap) OutDegree(v groph.VIdx) int

func (*DBitmap) Reset

func (m *DBitmap) Reset(order int)

func (*DBitmap) RootCount

func (g *DBitmap) RootCount() int

func (*DBitmap) SetEdge

func (g *DBitmap) SetEdge(u, v groph.VIdx, w bool)

func (*DBitmap) Size

func (g *DBitmap) Size() int

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]

func (*Directed[W]) DelEdge

func (g *Directed[W]) DelEdge(u, v groph.VIdx)

func (*Directed[W]) EachEdge

func (g *Directed[W]) EachEdge(onEdge groph.VisitEdgeW[W]) error

func (*Directed[W]) EachIn

func (g *Directed[W]) EachIn(to groph.VIdx, onSource groph.VisitVertex) error

func (*Directed[W]) EachLeaf

func (g *Directed[W]) EachLeaf(onEdge groph.VisitVertex) error

func (*Directed[W]) EachOut

func (g *Directed[W]) EachOut(from groph.VIdx, onDest groph.VisitVertex) error

func (*Directed[W]) EachRoot

func (g *Directed[W]) EachRoot(onEdge groph.VisitVertex) error

func (*Directed[W]) Edge

func (g *Directed[W]) Edge(u, v groph.VIdx) W

func (*Directed[W]) InDegree

func (g *Directed[W]) InDegree(v groph.VIdx) int

func (*Directed[W]) IsEdge

func (g *Directed[W]) IsEdge(w W) bool

func (*Directed[W]) LeafCount

func (g *Directed[W]) LeafCount() int

func (*Directed[W]) NotEdge

func (g *Directed[W]) NotEdge() W

func (*Directed) Order

func (m *Directed) Order() int

func (*Directed[W]) OutDegree

func (g *Directed[W]) OutDegree(v groph.VIdx) int

func (*Directed[W]) Reset

func (g *Directed[W]) Reset(order int)

func (*Directed[W]) RootCount

func (g *Directed[W]) RootCount() int

func (*Directed[W]) SetEdge

func (g *Directed[W]) SetEdge(u, v groph.VIdx, w W)

func (*Directed[W]) Size

func (g *Directed[W]) Size() (s int)

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]) Degree

func (g *Undirected[W]) Degree(v groph.VIdx) int

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) Order

func (m *Undirected) Order() int

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

Jump to

Keyboard shortcuts

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