quiver
package quiver
- Grouped
- Alphabetic
- By Inheritance
- quiver
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
type
Adj[N, B] = Vector[(B, N)]
Labeled links to or from a node
-
case class
BiDecomp
[N, A, B](first: Context[N, A, B], last: Context[N, A, B], rest: Graph[N, A, B]) extends Product with Serializable
The decomposition of a graph into two detached contexts focused on distinguished "first" and "last" nodes.
-
case class
Context
[N, A, B](inAdj: Adj[N, B], vertex: N, label: A, outAdj: Adj[N, B]) extends Product with Serializable
The view of a graph focused on the context surrounding a particular node.
-
case class
Decomp
[N, A, B](ctx: Option[Context[N, A, B]], rest: Graph[N, A, B]) extends Product with Serializable
The decomposition of a graph into possibly a detached context focused on one node, and the rest of the graph.
- case class Edge [N](from: N, to: N) extends Product with Serializable
-
case class
GDecomp
[N, A, B](ctx: Context[N, A, B], rest: Graph[N, A, B]) extends Product with Serializable
The decomposition of a graph into a detached context focused on one node, and the rest of the graph.
-
case class
GrContext
[N, A, B](inAdj: Map[N, Set[B]], label: A, outAdj: Map[N, Set[B]]) extends Product with Serializable
The label, predecessors, and successors of a given node
-
case class
Graph
[N, A, B](rep: GraphRep[N, A, B]) extends Product with Serializable
An implementation of an inductive graph where nodes of type
N
are labeled withA
, and edges are labeled withB
. -
type
GraphRep[N, A, B] = Map[N, GrContext[N, A, B]]
The internal representation of a graph
- case class LEdge [N, A](from: N, to: N, label: A) extends Product with Serializable
- case class LNode [N, A](vertex: N, label: A) extends Product with Serializable
-
type
LPath[N, A] = Vector[(A, N)]
Labeled path through a graph
-
type
LRTree[N, A] = Stream[LPath[N, A]]
Inward directed tree as a list of labeled paths
-
type
Path[N] = Vector[N]
Unlabeled path through a graph
-
type
RTree[N] = Stream[Path[N]]
Inward directed tree as a list of paths
-
type
UEdge[N] = LEdge[N, Unit]
Quasi-unlabaled edge
-
type
UNode[N] = LNode[N, Unit]
Quasi-unlabeled node
Value Members
- def addPred[N, A, B](g: GraphRep[N, A, B], v: N, lss: Vector[(B, N)]): GraphRep[N, A, B]
- def addSucc[N, A, B](g: GraphRep[N, A, B], v: N, lps: Vector[(B, N)]): GraphRep[N, A, B]
-
def
banana(n: Int, k: Int): Graph[Int, Unit, Unit]
Create an
(n,k)
-banana tree, which is an undirected graph obtained by connecting one leaf of each ofn
copies of ak
-star graph with a single root vertex that is distinct from all the stars. -
def
buildGraph[N, A, B](ctxs: Seq[Context[N, A, B]]): Graph[N, A, B]
Build a graph from a list of contexts
- def clear[N, A, B](g: GraphRep[N, A, B], v: N, ns: Vector[N], f: (GrContext[N, A, B]) ⇒ GrContext[N, A, B]): GraphRep[N, A, B]
- def clearPred[N, A, B](g: GraphRep[N, A, B], v: N, ns: Vector[N]): GraphRep[N, A, B]
- def clearSucc[N, A, B](g: GraphRep[N, A, B], v: N, ns: Vector[N]): GraphRep[N, A, B]
- implicit def contextOrder[N, A, B](implicit N: Order[N], A: Order[A], B: Order[B]): Order[Context[N, A, B]]
-
def
cycle[N](vs: Seq[N]): Graph[N, Unit, Unit]
Create a graph that is a cycle of the given nodes
- implicit def edgeOrder[N, A](implicit N: Order[N]): Order[Edge[N]]
-
def
empty[N, A, B]: Graph[N, A, B]
An empty graph
-
def
fromAdj[N, B](adj: Adj[N, B]): Map[N, Set[B]]
Turn an adjacency list of labeled edges into an intmap of sets of labels
- implicit def gdecompOrder[N, A, B](implicit arg0: Order[N], arg1: Order[A], arg2: Order[B]): Order[GDecomp[N, A, B]]
-
def
getLPath[N, A](v: N, t: LRTree[N, A]): Option[LPath[N, A]]
Find the first path in a labeled search tree that starts with the given node
-
def
getPath[N](v: N, t: RTree[N]): Option[Path[N]]
Find the first path in a search tree that starts with the given node
-
implicit
def
graphMonoid[N, A, B]: Monoid[Graph[N, A, B]]
The monoid of graph unions
- implicit def graphOrder[N, A, B](implicit N: Order[N], A: Order[A], B: Order[B]): Order[Graph[N, A, B]]
- implicit def ledgeOrder[N, A](implicit N: Order[N], A: Order[A]): Order[LEdge[N, A]]
-
def
mkGraph[N, A, B](vs: Seq[LNode[N, A]], es: Seq[LEdge[N, B]]): Graph[N, A, B]
Create a graph from lists of labeled nodes and edges
- implicit def nodeOrder[N, A](implicit N: Order[N], A: Order[A]): Order[LNode[N, A]]
-
def
poset[N, A](ns: Seq[(N, A)])(implicit N: PartialOrdering[N]): Graph[N, A, Unit]
Build a graph from elements of a partially ordered set.
Build a graph from elements of a partially ordered set. The resulting graph has an edge from vertex
x
to vertexy
precisely whenx <= y
. -
def
safeMkGraph[N, A, B](vs: Seq[LNode[N, A]], es: Seq[LEdge[N, B]]): Graph[N, A, B]
Build a graph from lists of labeled nodes and edges, ignoring edges that reference missing nodes
-
def
star(n: Int): Graph[Int, Unit, Unit]
Create a directed star graph of degree
n
-
def
toAdj[N, B](bs: Map[N, Set[B]]): Adj[N, B]
Turn an intmap of sets of labels into an adjacency list of labeled edges
- object GDecomp extends Serializable