C++
C#
VB
JScript
All

# cols

Copyright (C) 2005 IENT-RWTH Aachen

template<class G> inline typename ColSplit< Matrix<G> >::self cols( Matrix<G> &X)
template<class G> inline typename ColSplit<const Matrix<G> >::self cols(const Matrix<G> &X)

Isolates each column

Parameters

X | The matrix

Returns

A vector representing each column: a vector of vectors

Example

    DenseMatrix<int>::self X(2,2,"1 2 3 4");
    cout << cols(X)[0] << endl; // [1 3]

See Also

cols, row, rows