Scythe-1.0.3
|
template<typename T_type = double, matrix_order ORDER = Col, matrix_style STYLE = Concrete>
Returns a view of a row vector. This operator returns a vector view of row i in this Matrix.
Example: #include <iostream> #include <scythestat/matrix.h> using namespace scythe; int main () { /* Say hello */ Matrix<char> A(5, 7, true, ' '); A(_, 0) = A(_, 4) = A(_, 6) = '*'; A(2, _) = '*'; A(2, 5) = A(1, 6) = ' '; std::cout << A << "\n"; /* Note that the lines: * A(_, 0) = A(_, 4) = A(_, 6) = '*'; * A(2, _0) = '*'; * can be consolidated into a single chain of assignments only when * the compiler flag SCYTHE_VIEW_ASSIGNMENT_RECYCLE is defined. * This is becasue the submatrix A(2, _) is not the same size as the * other submatrices and such a sequence of assignments will cause * an error under the default view assignment behavior. */ return 0; } |