Skip to content

Commit 563c1e3

Browse files
authored
Merge pull request #22 from dhendriks/18-release-2.0
#18 More JavaDoc fixes to fix release build.
2 parents 901a296 + 29d8188 commit 563c1e3

File tree

4 files changed

+55
-2
lines changed

4 files changed

+55
-2
lines changed

src/main/java/com/github/javabdd/BDDFactory.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ public void save(String filename, BDD var) throws IOException {
770770
* </p>
771771
*
772772
* @param out writer
773-
* @praam r BDD
773+
* @param r BDD
774774
* @throws IOException In case of an I/O error.
775775
*/
776776
public void save(BufferedWriter out, BDD r) throws IOException {
@@ -798,6 +798,12 @@ public void save(BufferedWriter out, BDD r) throws IOException {
798798

799799
/**
800800
* Helper function for save().
801+
*
802+
* @param out writer
803+
* @param visited visited nodes bitset
804+
* @param root root BDD
805+
* @return bitset index
806+
* @throws IOException In case of an I/O error.
801807
*/
802808
protected int save_rec(BufferedWriter out, BitSet visited, BDD root) throws IOException {
803809
if (root.isZero()) {

src/main/java/com/github/javabdd/BDDPairing.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ public abstract class BDDPairing {
1515
* <p>
1616
* Compare to bdd_setpair.
1717
* </p>
18+
*
19+
* @param oldvar old variable
20+
* @param newvar new variable
1821
*/
1922
public abstract void set(int oldvar, int newvar);
2023

@@ -24,6 +27,9 @@ public abstract class BDDPairing {
2427
* <p>
2528
* Compare to bdd_setpairs.
2629
* </p>
30+
*
31+
* @param oldvar old variables
32+
* @param newvar new variables
2733
*/
2834
public void set(int[] oldvar, int[] newvar) {
2935
if (oldvar.length != newvar.length) {
@@ -44,6 +50,9 @@ public void set(int[] oldvar, int[] newvar) {
4450
* <p>
4551
* Compare to bdd_setbddpair.
4652
* </p>
53+
*
54+
* @param oldvar old variable
55+
* @param newvar new BDD
4756
*/
4857
public abstract void set(int oldvar, BDD newvar);
4958

@@ -53,6 +62,9 @@ public void set(int[] oldvar, int[] newvar) {
5362
* <p>
5463
* Compare to bdd_setbddpairs.
5564
* </p>
65+
*
66+
* @param oldvar old variables
67+
* @param newvar new BDDs
5668
*/
5769
public void set(int[] oldvar, BDD[] newvar) {
5870
if (oldvar.length != newvar.length) {
@@ -70,6 +82,9 @@ public void set(int[] oldvar, BDD[] newvar) {
7082
* <p>
7183
* Compare to fdd_setpair.
7284
* </p>
85+
*
86+
* @param p1 first finite domain block
87+
* @param p2 second finite domain block
7388
*/
7489
public void set(BDDDomain p1, BDDDomain p2) {
7590
int[] ivar1 = p1.vars();
@@ -83,6 +98,9 @@ public void set(BDDDomain p1, BDDDomain p2) {
8398
* <p>
8499
* Compare to fdd_setpairs.
85100
* </p>
101+
*
102+
* @param p1 first finite domain blocks
103+
* @param p2 second finite domain blocks
86104
*/
87105
public void set(BDDDomain[] p1, BDDDomain[] p2) {
88106
if (p1.length != p2.length) {

src/main/java/com/github/javabdd/BitString.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ public final class BitString implements Cloneable, java.io.Serializable {
4343

4444
/**
4545
* Convert bitIndex to a subscript into the bits[] array.
46+
*
47+
* @param bitIndex bit index
48+
* @return subscript
4649
*/
4750
private static int subscript(int bitIndex) {
4851
return bitIndex >> BITS_PER_UNIT;
@@ -63,6 +66,8 @@ public BitString(int nbits) {
6366

6467
/**
6568
* Returns the first index in the bit string which is set, or -1 if there is no such index.
69+
*
70+
* @return the first index
6671
*/
6772
public int firstSet() {
6873
return firstSet(-1);
@@ -73,6 +78,7 @@ public int firstSet() {
7378
* index.
7479
*
7580
* @param where the starting point for the search. May be negative.
81+
* @return the first index
7682
*/
7783
public int firstSet(int where) {
7884
// convert exclusive starting point to inclusive starting point
@@ -175,6 +181,7 @@ public static final int bsr(int v) {
175181
* index.
176182
*
177183
* @param where the starting point for the search.
184+
* @return last index
178185
*/
179186
public int lastSet(int where) {
180187
// convert exclusive starting point to inclusive starting point
@@ -199,6 +206,8 @@ public int lastSet(int where) {
199206

200207
/**
201208
* Returns the last index in the bit string which is set, or -1 if there is no such index.
209+
*
210+
* @return last index
202211
*/
203212
public int lastSet() {
204213
return lastSet(size());
@@ -291,6 +300,7 @@ public void clear(int bit) {
291300
* Gets a bit.
292301
*
293302
* @param bit the bit to be gotten (zero-based)
303+
* @return the bit
294304
*/
295305
public boolean get(int bit) {
296306
int n = subscript(bit);
@@ -302,6 +312,7 @@ public boolean get(int bit) {
302312
* modified in response to the operation.
303313
*
304314
* @param set the bit set to be ANDed with
315+
* @return modified
305316
*/
306317
public boolean and(BitString set) {
307318
if (this == set) { // should help alias analysis
@@ -322,6 +333,7 @@ public boolean and(BitString set) {
322333
* modified in response to the operation.
323334
*
324335
* @param set the bit set to be ORed with
336+
* @return modified
325337
*/
326338
public boolean or(BitString set) {
327339
if (this == set) { // should help alias analysis
@@ -342,6 +354,7 @@ public boolean or(BitString set) {
342354
* modified in response to the operation.
343355
*
344356
* @param set the bit set to be ORed with
357+
* @return modified
345358
*/
346359
public boolean or_upTo(BitString set, int bit) {
347360
if (this == set) { // should help alias analysis
@@ -365,6 +378,7 @@ public boolean or_upTo(BitString set, int bit) {
365378
* modified in response to the operation.
366379
*
367380
* @param set the bit set to be XORed with
381+
* @return modified
368382
*/
369383
public boolean xor(BitString set) {
370384
int setLength = set.bits.length;
@@ -382,6 +396,7 @@ public boolean xor(BitString set) {
382396
* was modified in response to the operation.
383397
*
384398
* @param set the bit set to subtract
399+
* @return modified
385400
*/
386401
public boolean minus(BitString set) {
387402
int n = bits.length;
@@ -398,6 +413,7 @@ public boolean minus(BitString set) {
398413
* Check if the intersection of the two sets is empty.
399414
*
400415
* @param other the set to check intersection with
416+
* @return is empty or not
401417
*/
402418
public boolean intersectionEmpty(BitString other) {
403419
int n = bits.length;
@@ -413,6 +429,7 @@ public boolean intersectionEmpty(BitString other) {
413429
* Check if this set contains all bits of the given set.
414430
*
415431
* @param other the set to check containment with
432+
* @return contains or not
416433
*/
417434
public boolean contains(BitString other) {
418435
int n = bits.length;
@@ -523,6 +540,8 @@ public int hashCode() {
523540
/**
524541
* Returns the "logical size" of this <code>BitString</code>: the index of the highest set bit in the
525542
* <code>BitString</code> plus one. Returns zero if the <code>BitString</code> contains no set bits.
543+
*
544+
* @return logical size
526545
*/
527546
public int length() {
528547
return lastSet() + 1;
@@ -531,6 +550,8 @@ public int length() {
531550
/**
532551
* Returns the number of bits of space actually in use by this <code>BitString</code> to represent bit values. The
533552
* maximum element in the set is the size - 1st element. The minimum element in the set is the zero'th element.
553+
*
554+
* @return number of bits
534555
*/
535556
public int size() {
536557
return bits.length << BITS_PER_UNIT;
@@ -656,6 +677,8 @@ public String toString() {
656677

657678
/**
658679
* Returns an iterator that iterates through the bits in forward order.
680+
*
681+
* @return an iterator
659682
*/
660683
public ForwardBitStringIterator iterator() {
661684
return new ForwardBitStringIterator();
@@ -667,13 +690,17 @@ public ForwardBitStringZeroIterator zeroIterator() {
667690

668691
/**
669692
* Returns an iterator that iterates through the bits in backward order.
693+
*
694+
* @return an iterator
670695
*/
671696
public BackwardBitStringIterator backwardsIterator() {
672697
return new BackwardBitStringIterator();
673698
}
674699

675700
/**
676701
* Returns an iterator that iterates through the bits in backward order, starting at the given index.
702+
*
703+
* @return an iterator
677704
*/
678705
public BackwardBitStringIterator backwardsIterator(int i) {
679706
return new BackwardBitStringIterator(i);
@@ -685,6 +712,8 @@ public BackwardBitStringIterator backwardsIterator(int i) {
685712
public abstract static class BitStringIterator implements Iterator<Integer> {
686713
/**
687714
* Returns the index of the next bit set.
715+
*
716+
* @return the index
688717
*/
689718
public abstract int nextIndex();
690719

src/main/java/com/github/javabdd/TryVarOrder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ public void free() {
299299
/** File pointers for output and input BDDs. */
300300
File f0, f1, f2, f3;
301301

302-
/** Construct a new TryVarOrder. */
303302
public TryVarOrder(int nodeTableSize, int cacheSize, int maxIncrease, long bestTime, long delayTime) {
304303
this.bestCalcTime = bestTime;
305304
// this.nodeTableSize = b1.getFactory().getAllocNum();
@@ -388,6 +387,7 @@ public void writeBDDConfig(BDDFactory bdd, String fileName) throws IOException {
388387
/**
389388
* Try out a variable order.
390389
*
390+
* @param factory BDD factory name
391391
* @param reverse whether to reverse the bits
392392
* @param varOrder variable order to try
393393
* @return time spent, or Long.MAX_VALUE if it didn't terminate

0 commit comments

Comments
 (0)