|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.bddbddb.order.Order
public class Order
Represents an order. This is just a List with a few extra utility functions.
Field Summary | |
---|---|
static double[] |
COMPLEXITY_MULTI
|
static double[] |
COMPLEXITY_SINGLE
|
static double |
INTERLEAVE_WEIGHT
|
static double |
PRECEDENCE_WEIGHT
|
Constructor Summary | |
---|---|
Order(java.util.List l)
Construct a new Order from the given list. |
|
Order(Order o)
Construct a new Order that is a copy of the given Order. |
Method Summary | |
---|---|
void |
add(int index,
java.lang.Object element)
|
boolean |
add(java.lang.Object o)
|
boolean |
addAll(java.util.Collection c)
|
boolean |
addAll(int index,
java.util.Collection c)
|
static java.util.Map |
calcLongSimilarities(java.util.Collection c)
Given a collection of orders, find its similarities and the number of occurrences of each similarity. |
void |
clear()
|
int |
compareTo(java.lang.Object arg0)
|
int |
compareTo(Order that)
Compares orders lexigraphically. |
double |
complexity()
Returns a measure of the complexity of this order. |
boolean |
contains(java.lang.Object o)
|
boolean |
containsAll(java.util.Collection c)
|
boolean |
equals(java.lang.Object obj)
|
boolean |
equals(Order that)
|
java.util.Collection |
findLongSimilarities(Order that)
Return the collection of suborders that are similar between this order and the given order. |
java.lang.Object |
get(int index)
|
java.util.Collection |
getAllInterleaveConstraints()
Get all interleave constraints of this order. |
java.util.Collection |
getAllPrecedenceConstraints()
Get all precedence constraints of this order. |
java.util.Collection |
getConstraints()
Return the collection of constraints in this order. |
java.util.List |
getFlattened()
Return the flattened version of this list. |
int |
hashCode()
|
int |
indexOf(java.lang.Object o)
|
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
|
int |
lastIndexOf(java.lang.Object o)
|
java.util.ListIterator |
listIterator()
|
java.util.ListIterator |
listIterator(int index)
|
int |
numberOfElements()
Returns the number of elements in this order. |
int |
numInterleaveConstraints()
Get the number of interleave constraints in this order. |
int |
numPrecedenceConstraints()
Get the number of precedence constraints in this order. |
boolean |
obeysConstraint(OrderConstraint c)
Returns true if this order obeys the given constraint. |
static Order |
parse(java.lang.String s,
java.util.Map nameToObj)
Parse an order from a string. |
java.lang.Object |
remove(int index)
|
boolean |
remove(java.lang.Object o)
|
boolean |
removeAll(java.util.Collection c)
|
boolean |
retainAll(java.util.Collection c)
|
java.lang.Object |
set(int index,
java.lang.Object element)
|
double |
similarity(Order that)
Returns the similarity between two orders as a number between 0.0 and 1.0. |
int |
size()
|
java.util.List |
subList(int fromIndex,
int toIndex)
|
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] a)
|
java.lang.String |
toString()
|
java.lang.String |
toVarOrderString(java.util.Map variableToBDDDomain)
Generate a BDD order string from this variable order. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static double PRECEDENCE_WEIGHT
public static double INTERLEAVE_WEIGHT
public static double[] COMPLEXITY_SINGLE
public static double[] COMPLEXITY_MULTI
Constructor Detail |
---|
public Order(Order o)
o
- order to copypublic Order(java.util.List l)
l
- listMethod Detail |
---|
public boolean obeysConstraint(OrderConstraint c)
c
- constraint
public java.util.Collection getConstraints()
public int numberOfElements()
public java.util.List getFlattened()
public java.util.Collection getAllInterleaveConstraints()
public int numInterleaveConstraints()
public java.util.Collection getAllPrecedenceConstraints()
public int numPrecedenceConstraints()
public double similarity(Order that)
that
-
public double complexity()
public int compareTo(java.lang.Object arg0)
compareTo
in interface java.lang.Comparable
public int compareTo(Order that)
that
- order to compare to
public boolean equals(Order that)
public boolean equals(java.lang.Object obj)
equals
in interface java.util.Collection
equals
in interface java.util.List
equals
in class java.lang.Object
public boolean add(java.lang.Object o)
add
in interface java.util.Collection
add
in interface java.util.List
public void add(int index, java.lang.Object element)
add
in interface java.util.List
public boolean addAll(int index, java.util.Collection c)
addAll
in interface java.util.List
public boolean addAll(java.util.Collection c)
addAll
in interface java.util.Collection
addAll
in interface java.util.List
public void clear()
clear
in interface java.util.Collection
clear
in interface java.util.List
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection
contains
in interface java.util.List
public boolean containsAll(java.util.Collection c)
containsAll
in interface java.util.Collection
containsAll
in interface java.util.List
public java.lang.Object get(int index)
get
in interface java.util.List
public int hashCode()
hashCode
in interface java.util.Collection
hashCode
in interface java.util.List
hashCode
in class java.lang.Object
public int indexOf(java.lang.Object o)
indexOf
in interface java.util.List
public boolean isEmpty()
isEmpty
in interface java.util.Collection
isEmpty
in interface java.util.List
public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.List
public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List
public java.util.ListIterator listIterator()
listIterator
in interface java.util.List
public java.util.ListIterator listIterator(int index)
listIterator
in interface java.util.List
public java.lang.Object remove(int index)
remove
in interface java.util.List
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection
remove
in interface java.util.List
public boolean removeAll(java.util.Collection c)
removeAll
in interface java.util.Collection
removeAll
in interface java.util.List
public boolean retainAll(java.util.Collection c)
retainAll
in interface java.util.Collection
retainAll
in interface java.util.List
public java.lang.Object set(int index, java.lang.Object element)
set
in interface java.util.List
public int size()
size
in interface java.util.Collection
size
in interface java.util.List
public java.util.List subList(int fromIndex, int toIndex)
subList
in interface java.util.List
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
toArray
in interface java.util.List
public java.lang.Object[] toArray(java.lang.Object[] a)
toArray
in interface java.util.Collection
toArray
in interface java.util.List
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toVarOrderString(java.util.Map variableToBDDDomain)
variableToBDDDomain
- map from variable to BDD
public static Order parse(java.lang.String s, java.util.Map nameToObj)
s
- string to parsenameToObj
- map from name to object (variable, etc.)
public static java.util.Map calcLongSimilarities(java.util.Collection c)
c
- collection of orders
public java.util.Collection findLongSimilarities(Order that)
that
- other order
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |