Accessing elements

Elements are accessed by expressions of the form A(i, j) where i and j start from 0 to one less than the appropriate dimension. Access elements of vectors with just one argument. The elements of a vector or matrix can also be accessed with standard C array notation:

    m(3, 4) = 0.0;      // Set row 3, column 4 of the matrix
    int a = m[0][0];    // Get the element of the matrix at row 0, column 0
    v(2) = 4.0;         // Set element 2 of the vector

Note:
Index range checks will be performed on all element accesses for matrix/vector with exmat::FullErrorChecker
Comma assignment is supported in exmat:
    exmat::Mat<DenseColVecCon<float, 3> > v1;
    v1 = 1, 2, 3;
    exmat::Mat<DenseMatCon<float, 2, 2> > m1;
    m1 = 1, 2
         3, 4;
Note:
The elements specified in the comma list will be assigned to the matrix row-wise
Go to the next section : Operators
Generated on Sat May 6 23:12:04 2006 for Exmat by  doxygen 1.4.6-NO