Package org.batfish
Class MutableBDDInteger
java.lang.Object
org.batfish.BDDInteger
org.batfish.MutableBDDInteger
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
Fields inherited from class org.batfish.BDDInteger
_bitvec, _factory, _maxVal -
Constructor Summary
ConstructorsConstructorDescriptionMutableBDDInteger(net.sf.javabdd.BDDFactory factory, int length) MutableBDDInteger(net.sf.javabdd.BDDFactory factory, net.sf.javabdd.BDD[] bitvec) -
Method Summary
Modifier and TypeMethodDescriptionadd(BDDInteger other) addClipping(BDDInteger other) net.sf.javabdd.BDDallDifferences(BDDInteger other) Produces a BDD whose models represent all possible differences between the two BDDIntegers -- valuations of the BDD variables that cause the two BDDIntegers to have different values.and(net.sf.javabdd.BDD pred) booleanprotected net.sf.javabdd.BDDfirstBitsEqual(long value, int length) Check if the first length bits match the BDDInteger representing the advertisement prefix.voidfree()Free all the componentBDDsin thisBDDInteger.getValueSatisfying(net.sf.javabdd.BDD bdd) Find a representative value of the represented integer that satisfies a given constraint.inthashCode()ite(net.sf.javabdd.BDD b, MutableBDDInteger other) static MutableBDDIntegermakeFromIndex(net.sf.javabdd.BDDFactory factory, int length, int start, boolean reverse) Create an integer, and initialize its values as "don't care" This requires knowing the start index variables the bitvector will use.static MutableBDDIntegermakeFromValue(net.sf.javabdd.BDDFactory factory, int length, long value) Create an integer and initialize it to a concrete valuelongsatAssignmentToLong(net.sf.javabdd.BDD satAssignment) voidsetValue(long val) Set this BDD to have an exact valuevoidsetValue(MutableBDDInteger other) sub(BDDInteger other) subClipping(BDDInteger other) net.sf.javabdd.BDDsupport()Produces a BDD that represents the support (i.e., the set of BDD variables) of this BDD integer.net.sf.javabdd.BDDtoBDD(IpWildcard ipWildcard) Build a constraint that matches theIPsmatched by the inputIpWildcard.Methods inherited from class org.batfish.BDDInteger
geq, getFactory, getValuesSatisfying, leq, range, satAssignmentToInt, size, toBDD, toBDD, value
-
Constructor Details
-
MutableBDDInteger
public MutableBDDInteger(net.sf.javabdd.BDDFactory factory, net.sf.javabdd.BDD[] bitvec) -
MutableBDDInteger
public MutableBDDInteger(net.sf.javabdd.BDDFactory factory, int length) -
MutableBDDInteger
-
-
Method Details
-
makeFromIndex
public static MutableBDDInteger makeFromIndex(net.sf.javabdd.BDDFactory factory, int length, int start, boolean reverse) Create an integer, and initialize its values as "don't care" This requires knowing the start index variables the bitvector will use. -
makeFromValue
public static MutableBDDInteger makeFromValue(net.sf.javabdd.BDDFactory factory, int length, long value) Create an integer and initialize it to a concrete value -
setValue
public void setValue(long val) Set this BDD to have an exact value -
getValueSatisfying
Description copied from class:BDDIntegerFind a representative value of the represented integer that satisfies a given constraint.- Specified by:
getValueSatisfyingin classBDDInteger
-
satAssignmentToLong
public long satAssignmentToLong(net.sf.javabdd.BDD satAssignment) - Specified by:
satAssignmentToLongin classBDDInteger
-
firstBitsEqual
protected net.sf.javabdd.BDD firstBitsEqual(long value, int length) Check if the first length bits match the BDDInteger representing the advertisement prefix.- Specified by:
firstBitsEqualin classBDDInteger
-
toBDD
Description copied from class:BDDIntegerBuild a constraint that matches theIPsmatched by the inputIpWildcard.- Specified by:
toBDDin classBDDInteger
-
add
-
addClipping
-
free
public void free()Free all the componentBDDsin thisBDDInteger. This instance is no longer safe to use unless re-initialized via, e.g.,setValue(long). -
ite
-
and
- Parameters:
pred- a predicate- Returns:
- the same bitvector but restricted by pred.
-
allDifferences
Produces a BDD whose models represent all possible differences between the two BDDIntegers -- valuations of the BDD variables that cause the two BDDIntegers to have different values. The two BDDIntegers are assumed to have the same length.- Parameters:
other- the second BDDInteger- Returns:
- a predicate represented as a BDD
-
support
public net.sf.javabdd.BDD support()Produces a BDD that represents the support (i.e., the set of BDD variables) of this BDD integer. -
setValue
-
sub
-
subClipping
-
equals
-
hashCode
public int hashCode()
-