|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbaobab.trace.Trace
public class Trace
The Trace class represents a trace on 1..elementSize. A trace is a precedence defined set of sets, which are sorted sets of elements. An element is a sorted set of integers on 1..elementSize. A set is a collection of compatible elements (two elements are compatibles when they do not intersect or when one contains the other).
Constructor Summary | |
---|---|
Trace(byte[] element,
int elementSize)
Constructs a Trace |
|
Trace(Trace rule)
Constructs a Trace, as a clone of a given trace |
Method Summary | |
---|---|
void |
addElement(byte[] element,
int elementSize,
int prevNumberOfElements)
Adds a new element to this trace |
int[] |
getDebugElementData()
|
java.util.Vector<byte[]> |
getElements(int elementSize,
int numberOfElements)
Decode the trace as a Vector of elements (represented as arrays of bytes) |
long |
getNumberOfOccurrences()
Gets the number of occurrences of this trace |
int |
height(int elementSize,
int numberOfElements)
|
void |
incrementDebugNumberOfElements()
|
void |
incrementOccurrences(long add)
Increments the number of this trace |
boolean |
isEmpty()
|
void |
join(Trace trace)
|
static Trace |
parse(java.lang.String description,
int elementSize,
int numberOfElements)
|
void |
setDebugElementData(int[] debugData)
|
void |
split(Trace trace)
|
java.lang.String |
toString()
|
java.lang.String |
toString(int elementSize,
int numberOfElements)
Produces a string representation of a trace |
java.lang.String |
toString(int elementSize,
int numberOfElements,
java.lang.String[] mapIntToName)
Produces a string representation of a trace |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Trace(byte[] element, int elementSize)
element
- the first element represented as an array of byteselementSize
- the maximum value for all elementspublic Trace(Trace rule)
rule
- the give traceMethod Detail |
---|
public static Trace parse(java.lang.String description, int elementSize, int numberOfElements)
public void setDebugElementData(int[] debugData)
public int[] getDebugElementData()
public void incrementDebugNumberOfElements()
public void incrementOccurrences(long add)
add
- the number of occurrences to addpublic long getNumberOfOccurrences()
public java.util.Vector<byte[]> getElements(int elementSize, int numberOfElements)
elementSize
- the maximum value for all elementsnumberOfElements
- the number of elements on this trace
public void addElement(byte[] element, int elementSize, int prevNumberOfElements)
element
- the element to be added, represented as an array of byteselementSize
- the maximum value for all elements of this traceprevNumberOfElements
- the previous number of elements on this tracepublic int height(int elementSize, int numberOfElements)
public java.lang.String toString(int elementSize, int numberOfElements)
elementSize
- the maximum value for all elements of this tracenumberOfElements
- the number of elements on this trace
public java.lang.String toString(int elementSize, int numberOfElements, java.lang.String[] mapIntToName)
elementSize
- the maximum value for all elements of this tracenumberOfElements
- the number of elements on this trace
public java.lang.String toString()
toString
in class java.lang.Object
public void join(Trace trace)
join
in interface baobab.util.Joinable<Trace>
public void split(Trace trace)
split
in interface baobab.util.Joinable<Trace>
public boolean isEmpty()
isEmpty
in interface baobab.util.Joinable<Trace>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |