Member Functions | ||
operator++() |
operator void*() |
#include <rw/math/mtharray.h> /* Any array class will do */ for(RWMultiIndex i(n); i; ++i) { ... } // n is an IntVec
RWMathVec<int> v; RWGenMat<int> A; RWMathArray<int> X; . . . int vZeros = numZeros(v); int AZeros = numZeros(A); int XZeros = numZeros(X)
#include <rw/math/mtharray.h>
int numZeros(const RWMathArray<int>& X) // Count the number
// of zeros in X { int count=0; for(RWMultiIndex i(X.length()); i; ++i) { if (X(i)==0) ++count; } return count; }
RWMultiIndex(const RWGenMat<int>& n);
Constructs an index to count from 0 to n.
void operator++()
Increments the index.
operator void*()
Returns 0 if the index is no longer valid. An index becomes invalid when it is incremented beyond its limit.
©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.