|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnenok.va.sr.Configuration
public class Configuration
Utility class for the representation of configurations. This class encodes configurations (object arrays) into the according integer position of their standard enumeration.
Constructor Summary | |
---|---|
Configuration()
|
Method Summary | |
---|---|
static int |
convert(int conf,
FiniteVariable[] from,
FiniteVariable[] to)
Converts a configuration encoding relative to some variable array into the encoding relative to another variable array. |
static String[] |
decode(int conf,
FiniteVariable[] vars)
Decodes the given configuration (integer) into an object array. |
static int |
encode(Object[] conf,
FiniteVariable[] vars)
Encodes the given configuration (object array) into an integer. |
static String[] |
getConfigurations(FiniteVariable[] vars)
Transforms configurations into string representation. |
static int |
getSymbolIndex(FiniteVariable[] vars,
int var,
int conf)
This method returns the index of the variable's value at a specifique configuration. |
static int |
indexOf(Object[] objects,
Object item)
Finds an item in an array of objects. |
static Object[] |
project(Object[] conf,
FiniteVariable[] from,
FiniteVariable[] to)
Projects a configuration given as object array to some sub-set of variables. |
static Object[] |
union(Object[] c1,
FiniteVariable[] v1,
Object[] c2,
FiniteVariable[] v2,
FiniteVariable[] result)
Computes the union of two partial configurations. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Configuration()
Method Detail |
---|
public static int encode(Object[] conf, FiniteVariable[] vars)
conf
- The configuration to encode.vars
- The variable array to specify the configuration's order.
public static String[] decode(int conf, FiniteVariable[] vars)
conf
- The configuration to decode.vars
- The variable array to specify the configuration's order.
public static int convert(int conf, FiniteVariable[] from, FiniteVariable[] to)
conf
- The configuration to convert.from
- The variable array to which the input configuration is relative.to
- The variable array to which the output configuration is relative.
public static Object[] project(Object[] conf, FiniteVariable[] from, FiniteVariable[] to)
conf
- The configuration that has to be projected.from
- The variable array to which the argument configuration is relative.to
- The target array to which the projection is executed.
to
.public static Object[] union(Object[] c1, FiniteVariable[] v1, Object[] c2, FiniteVariable[] v2, FiniteVariable[] result)
c1
- The first configuration.v1
- The variable array that specifies the first configuration's order.c2
- The second configuration.v2
- The variable array that specifies the second configuration's order.result
- The variable array that specifies the result's order.
public static String[] getConfigurations(FiniteVariable[] vars)
vars
- The order of variables that defines the configurations.
public static int getSymbolIndex(FiniteVariable[] vars, int var, int conf)
vars
- The order of variables that defines the configuration.var
- The variable caracterized by its position.conf
- The configuration whose index has to be found.
getSymbol(vars, 0,3)
returns the index of variable 0's symbol
in vars at configuration 3.public static int indexOf(Object[] objects, Object item)
objects
- The array of objects.item
- The item to find.
-1
if the
item cannot be found.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |