public abstract class Undirected extends Graph
Modifier and Type | Class and Description |
---|---|
class |
Undirected.AsDirected
Treat every Undirected Edge of 'this' Undirected Graph as two
Directed Edges (a self-loop remains a single
self-loop, now Directed). |
static class |
Undirected.Dense
A Dense, Undirected Graph with Type t and adjacency Matrix A.
|
class |
Undirected.Edge
Also see
Directed.Edge . |
static class |
Undirected.K
The class of complete Undirected (unlabelled) Graphs, Kn.
|
static class |
Undirected.Sparse
The class of Sparse Undirected Graphs.
|
class |
Undirected.Vertex
Also see
Directed.Vertex . |
Graph.Canonical, Graph.Contraction, Graph.Derived, Graph.Induced, Graph.Renumbered, Graph.SubGraph, Graph.SubGraphs, Graph.ToDirected, Graph.ToUndirected
Value.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 |
---|---|
static Type |
unlabelled
The standard type of Undirected, unlabelled, no self-loops Graphs.
|
static Type |
unlabelled_O
Type of Undirected, unlabelled, self-loops (O) allowed Graphs.
|
Constructor and Description |
---|
Undirected() |
Modifier and Type | Method and Description |
---|---|
boolean |
adjacent(int v0,
int v1)
Equivalent to
isEdge(v0,v1) for an Undirected Graph
(but not for a Directed Graph). |
Directed |
asDirected()
Convenience function.
|
int |
degree(int v)
Also see
Directed.degree(int) . |
static Undirected |
dense(boolean selfLoops,
int[][] A)
|
static Undirected |
dense(boolean selfLoops,
Matrix A)
|
static Undirected |
dense(int[][] A)
dense(false,A) -- no self-loops. |
static Undirected |
dense(Matrix A)
dense(false, A)
-- no self-loops. |
static Undirected |
dense(Type t,
int[][] A)
dense(t,ints(.,A,.) ; A must be upper-right
triangular . |
static Undirected |
dense(Type t,
Matrix A)
Return an Undirected Graph of Type 't' and square
symmetric
adjacency Matrix 'A'. |
static void |
main(java.lang.String[] argv)
|
static Undirected.Sparse |
sparse(Type t,
int V,
int[][] es)
Convenience function.
|
Undirected |
toUndirected()
Identity function; see
Graph.toUndirected() . |
int[][] |
upperRightA()
Return the upper-right triangular part of the adjacency (array) Matrix
of this Undirected, and hence symmetric, Graph.
|
A, arrayA, byDegree, byDegree, canonical, canonical1, canonical1R, canonical2, canonical2R, checkProperties, contraction, directPredecessors, directSuccessors, edges, edgesCorrespond, eLabel, eLabelled, eLabels, eSize, eStats, flatten, hashCode, inDegree, induced, isDirected, isEdge, isomorphic, isUndirected, joinedTo, localHash, maxEdges, nAutomorphisms, outDegree, randomised, renumbered, selfLoops, structurallyIdentical, subGraphs, subGraphs, toDirected, type, vLabel, vLabelled, vLabels, vPair2n, vSize
public static final Type unlabelled
public static final Type unlabelled_O
public boolean adjacent(int v0, int v1)
isEdge(v0,v1)
for an Undirected Graph
(but not for a Directed
Graph).public int degree(int v)
Directed.degree(int)
.
A sub-class may have a more efficient implementation.public int[][] upperRightA()
A()
, and Matrix.ints_UR(boolean,int[][],int)
.public Undirected toUndirected()
Graph.toUndirected()
.toUndirected
in class Graph
public Directed asDirected()
public static Undirected dense(Type t, Matrix A)
symmetric
adjacency Matrix 'A'.
Also see Directed.dense(graph.Type, la.maths.Matrix)
and Graph.dense(graph.Type, la.maths.Matrix)
.public static Undirected dense(boolean selfLoops, Matrix A)
dense(t,A)
. 'selfLoops' specifies
if Graphs are allowed to have self-loops, not if
this Graph actually has any.public static Undirected dense(Matrix A)
dense(false, A)
-- no self-loops.public static Undirected dense(Type t, int[][] A)
dense(t,ints(.,A,.)
; A must be upper-right
triangular
.public static Undirected dense(boolean selfLoops, int[][] A)
dense(t,A)
. A must be upper-right
triangular
.public static Undirected dense(int[][] A)
dense(false,A)
-- no self-loops.
A must be upper-right
triangular
.public static Undirected.Sparse sparse(Type t, int V, int[][] es)
public static void main(java.lang.String[] argv)