sandmark.util.graph.codec
Class PermutationGraph
java.lang.Object
|
+--sandmark.util.graph.codec.GraphCodec
|
+--sandmark.util.graph.codec.PermutationGraph
- public class PermutationGraph
- extends GraphCodec
Method Summary |
(package private) static java.util.Vector |
construct(long[] perList)
|
(package private) static void |
createGraph(long value)
|
(package private) static java.util.Vector |
createVector(long length)
|
void |
decode()
Codecs should implement this method to convert
the 'graph' into 'value'. |
(package private) java.math.BigInteger |
decodePermutation(int[] per,
int n)
|
void |
encode()
Codecs should implement this method to convert
the 'value' into 'graph'. |
(package private) static boolean |
equals(java.util.Vector per1,
java.util.Vector per2)
|
(package private) static java.util.Vector |
index2perm(long perLength,
java.math.BigInteger perIndex)
|
static void |
main(java.lang.String[] args)
|
(package private) static java.math.BigInteger |
perm2index(long perLength,
java.util.Vector per)
|
(package private) static java.lang.String |
perm2String(java.util.Vector per)
|
(package private) static void |
swap(java.util.Vector V,
long i,
long j)
|
(package private) static void |
test1()
|
(package private) static void |
test2()
|
(package private) static void |
test3()
|
(package private) static void |
testOne(long perLength,
long i)
|
(package private) static void |
testVertexCount(long n)
|
(package private) static long |
vertexCount(java.math.BigInteger value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FULLNAME
public static final java.lang.String FULLNAME
- See Also:
- Constant Field Values
SHORTNAME
public static final java.lang.String SHORTNAME
- See Also:
- Constant Field Values
MAX_LENGTH
static final int MAX_LENGTH
- See Also:
- Constant Field Values
PermutationGraph
public PermutationGraph(java.math.BigInteger value)
PermutationGraph
public PermutationGraph(Graph graph,
int[] kidMap)
throws DecodeFailure
encode
public void encode()
- Description copied from class:
GraphCodec
- Codecs should implement this method to convert
the 'value' into 'graph'.
- Specified by:
encode
in class GraphCodec
vertexCount
static long vertexCount(java.math.BigInteger value)
swap
static void swap(java.util.Vector V,
long i,
long j)
createVector
static java.util.Vector createVector(long length)
index2perm
static java.util.Vector index2perm(long perLength,
java.math.BigInteger perIndex)
perm2index
static java.math.BigInteger perm2index(long perLength,
java.util.Vector per)
perm2String
static java.lang.String perm2String(java.util.Vector per)
construct
static java.util.Vector construct(long[] perList)
equals
static boolean equals(java.util.Vector per1,
java.util.Vector per2)
testOne
static void testOne(long perLength,
long i)
test1
static void test1()
test2
static void test2()
test3
static void test3()
createGraph
static void createGraph(long value)
testVertexCount
static void testVertexCount(long n)
main
public static void main(java.lang.String[] args)
decodePermutation
java.math.BigInteger decodePermutation(int[] per,
int n)
decode
public void decode()
throws DecodeFailure
- Description copied from class:
GraphCodec
- Codecs should implement this method to convert
the 'graph' into 'value'. Whenever the decoding
failes (eg. because the graph has the wrong
shape) the codec should simply throw an exception.
- Specified by:
decode
in class GraphCodec
DecodeFailure