public class Type extends Type.Structured
Type.Atomic, Type.Char, Type.Cts, Type.Discrete, Type.Enum, Type.Function, Type.Int, Type.Model, Type.Option, Type.Structured, Type.Triv, Type.Tuple, Type.TYPE, Type.Vector
Value.Option.GP
Value.Bool, Value.Chars, Value.Defer, Value.Inc_Or, Value.Lambda, Value.List, Value.Maybe, Value.Real, Value.Scannable
Modifier and Type | Field and Description |
---|---|
Type |
eType
Does the Graph have Vertex- and/or Edge- labels,
and if so, of what Type(s)?
|
boolean |
isDirected
Is the Graph Directed, and are self-loops allowed?
|
boolean |
selfLoops
Is the Graph Directed, and are self-loops allowed?
|
Type |
vType
Does the Graph have Vertex- and/or Edge- labels,
and if so, of what Type(s)?
|
BOOL, BOOL_N, CHAR, CHAR_N, CHARS, CTS, CTS_N, DNA, ENUM_N, FUNCTION, FUNCTION_N, INC_OR, INT, INT_N, LIST, MATRIX_CTS, MATRIX_INT, MAYBE, MODEL, MODEL_N, name, OPTION_N, PAIR, TRIPLE, TRIV, TRIV_N, TUPLE_N, TYPE, TYPE_N, VECTOR, VECTOR_CHARS, VECTOR_CTS, VECTOR_INT, VECTOR_N
Constructor and Description |
---|
Type(boolean isDirected)
Construct a Graph Type with no Vertex or Edge label Types,
that is unlabelled.
|
Type(java.lang.String name,
boolean isDirected)
Assumes no self-loops, and not Vertex- or Edge- labelled.
|
Type(java.lang.String name,
boolean isDirected,
boolean selfLoops)
Assumes not Vertex- or Edge- labelled.
|
Type(java.lang.String name,
boolean isDirected,
boolean selfLoops,
Type vType,
Type eType)
Construct a Graph Type with specified isDirected(?), selfLoops(?),
Vertex label Type 'vType', and
Edge label Type 'eType.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkProperties(Graph g)
Check that Graph 'g' does satisfy the requirements of 'this' Type.
|
Type |
clone(boolean isDirected)
Return a "cloned" Type but with 'isDirected' set as indicated.
|
Value |
elt(int i)
|
int |
maxEdges(int vSize)
What is the maximum number of Edges for a Graph of this Type with
'vSize' Vertices? (If allowed, a self-loop counts as one.)
|
int |
n()
Return this Option Value's number within its
Option
Type . |
int |
nElts()
Four, see
elt(i) . |
boolean |
ni(Value g)
Does
Graph g belong to (satisfy) 'this' Graph Type? |
closes, compareTo, opens, separator
public final boolean isDirected
public final boolean selfLoops
public final Type vType
public final Type eType
public Type(boolean isDirected)
public Type(java.lang.String name, boolean isDirected)
public Type(java.lang.String name, boolean isDirected, boolean selfLoops)
public Type clone(boolean isDirected)
public int maxEdges(int vSize)
public boolean checkProperties(Graph g)
public int n()
Value.Option
Type
.n
in class Value.Option