public static class Undirected.Sparse extends Undirected implements Graph.Sparse
Undirected.Dense and Directed.Sparse.| Modifier and Type | Class and Description |
|---|---|
class |
Undirected.Sparse.Induced
An induced SubGraph of a Sparse Undirected Graph is
Sparse and Undirected.
|
class |
Undirected.Sparse.Renumbered
A Sparse Undirected Graph, renumbered according to
vs, is Sparse and Undirected. |
Undirected.AsDirected, Undirected.Dense, Undirected.Edge, Undirected.K, Undirected.Sparse, Undirected.VertexGraph.Canonical, Graph.Contraction, Graph.Derived, Graph.SubGraph, Graph.SubGraphs, Graph.ToDirected, Graph.ToUndirectedValue.Atomic, Value.Bool, Value.Char, Value.Chars, Value.Cts, Value.Defer, Value.Discrete, Value.Enum, Value.Inc_Or, Value.Int, Value.Lambda, Value.List, Value.Maybe, Value.Option, Value.Real, Value.Scannable, Value.Structured, Value.Triv, Value.Tuple| Modifier and Type | Field and Description |
|---|---|
int[][] |
es
The Edges, as int[|E|][2], defining 'this' Undirected
Sparse Graph.
|
int[][] |
joined
Given an Edge (v0, v1), v1 is in (ascending) joined[v0],
and v0 is in joined[v1].
|
unlabelled, unlabelled_O| Constructor and Description |
|---|
Sparse(int[][] es)
Assume that the max Vertex mentioned in es is the last Vertex.
|
Sparse(Type t,
int V,
int[][] es)
Undirected Edges
|
| Modifier and Type | Method and Description |
|---|---|
int |
degree(int v)
O(1)-time.
|
int |
eSize()
The number of Edges in 'this' Graph, |E|≥0.
|
Undirected.Sparse.Induced |
induced(int[] vs)
An induced SubGraph of a Sparse Undirected Graph is
Sparse and Undirected.
|
boolean |
isEdge(int v0,
int v1)
Is 〈v0, v1〉 an Edge in 'this' Graph?
Also see
adjacent(v0,v1). |
Series.Int |
joinedTo(int v)
An increasing Series of those Vertices 'w'
adjacent to v, that is (v,w) is an Edge or
(w,v) is (includes v, once, if there is a loop (v,v)). |
Undirected.Sparse.Renumbered |
renumbered(int[] vs)
A renumbered Sparse Undirected Graph is Sparse and Undirected.
|
java.lang.String |
toString()
|
Type |
type()
Note, type(),
Graph.adjacent(int, int),
Graph.vLabelled(), Graph.vLabel(int),
Graph.eLabelled(), and Graph.eLabel(int, int) must be consistent. |
int |
vSize()
The number of Vertices, |V|≥1,
|
adjacent, asDirected, dense, dense, dense, dense, dense, dense, main, sparse, toUndirected, upperRightAA, arrayA, byDegree, byDegree, canonical, canonical1, canonical1R, canonical2, canonical2R, checkProperties, contraction, directPredecessors, directSuccessors, edges, edgesCorrespond, eLabel, eLabelled, eLabels, eStats, flatten, hashCode, inDegree, isDirected, isomorphic, isUndirected, localHash, maxEdges, nAutomorphisms, outDegree, randomised, selfLoops, structurallyIdentical, subGraphs, subGraphs, toDirected, vLabel, vLabelled, vLabels, vPair2npublic final int[][] joined
public final int[][] es
public Sparse(int[][] es)
public Sparse(Type t, int V, int[][] es)
public Type type()
GraphGraph.adjacent(int, int),
Graph.vLabelled(), Graph.vLabel(int),
Graph.eLabelled(), and Graph.eLabel(int, int) must be consistent.public int vSize()
GrapheSize().public int eSize()
GraphvSize().public int degree(int v)
degree in class Undirectedpublic boolean isEdge(int v0,
int v1)
Graphadjacent(v0,v1).public Series.Int joinedTo(int v)
Graphadjacent to v, that is (v,w) is an Edge or
(w,v) is (includes v, once, if there is a loop (v,v)).
Note, this default is inefficient for sparse Graphs but
also see Directed.Sparse.joinedTo(int) and
joinedTo(int).public java.lang.String toString()
Valueprinting of
constants, and in calls to Value.error(java.lang.String).
The result does not necessarily fully specify a large, or
infinite(!), Value. (This default returns the Class Name of 'this'.)
Also see print(ps).public Undirected.Sparse.Renumbered renumbered(int[] vs)
renumbered in class Graphpublic Undirected.Sparse.Induced induced(int[] vs)