|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ilog.cplex.example.CpxSparseVector
Class for representing sparse vectors.
Constructor Summary | |
CpxSparseVector()
create a sparse vector with no nonzeros. |
|
CpxSparseVector(int max)
create a sparse vector with no nonzeros. |
Method Summary | |
void |
add(double v,
int i)
add a nonzero with index i and coefficient value v |
void |
add(int i,
double v)
add a nonzero with index i and coefficient value v |
int |
find(int j)
return number of nonzero with index j in the sparse vector |
int |
getIndex(int i)
return index of the i'th nonzero |
int |
getNNZ()
return number of nonzeros currently in the sparse vector |
double |
getValue(int i)
return coefficient value of the i'th nonzero |
void |
remove(int n)
remove n'th nonzero from sparse vector |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public CpxSparseVector()
public CpxSparseVector(int max)
max
- number of nonzeros that can be added without
reallocation of internal buffers.Method Detail |
public int getNNZ()
public int getIndex(int i)
public double getValue(int i)
public void add(int i, double v)
public void add(double v, int i)
public void remove(int n)
public int find(int j)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |