Browse Source

Update comments

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@7118 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 13 years ago
parent
commit
7454f81abe
  1. 27
      prism/src/dv/DoubleVector.java
  2. 2
      prism/src/dv/package-info.java

27
prism/src/dv/DoubleVector.java

@ -67,13 +67,21 @@ public class DoubleVector
// instance variables/methods
//------------------------------------------------------------------------------
// data
private long v; // vector (actually a C/C++ pointer cast to a long)
private int n; // size
/**
* Vector contents (C/C++ pointer cast to a long)
*/
private long v;
/**
* Size of vector
*/
private int n;
// constructors
private native long DV_CreateZeroVector(int n);
/**
* Create a new DoubleVector of size {@code size} with all entries set to 0.
* @throws PrismException if there is insufficient memory to create the array.
*/
public DoubleVector(int size) throws PrismException
{
v = DV_CreateZeroVector(size);
@ -81,19 +89,28 @@ public class DoubleVector
n = size;
}
private native long DV_CreateZeroVector(int n);
/**
* Create a new DoubleVector from a pointer {@code vect} to an existing native double array of size {@code size}.
*/
public DoubleVector(long vector, int size)
{
v = vector;
n = size;
}
private native long DV_ConvertMTBDD(long dd, long vars, int num_vars, long odd);
/**
* Create a new DoubleVector from an existing MTBDD representation of an array.
*/
public DoubleVector(JDDNode dd, JDDVars vars, ODDNode odd)
{
v = DV_ConvertMTBDD(dd.ptr(), vars.array(), vars.n(), odd.ptr());
n = (int)(odd.getEOff() + odd.getTOff());
}
private native long DV_ConvertMTBDD(long dd, long vars, int num_vars, long odd);
// get methods
public long getPtr()

2
prism/src/dv/package-info.java

@ -1,4 +1,4 @@
/**
* Utility functions for operations on vectors of doubles (stored in C++ through JNI).
* Utility functions for operations on vectors of doubles or integers (stored in C++ through JNI).
*/
package dv;
Loading…
Cancel
Save