// Copyright (C) 2008-2012 National ICT Australia (NICTA) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. // ------------------------------------------------------------------- // // Written by Conrad Sanderson - http://conradsanderson.id.au // Written by Ryan Curtin // Written by Matthew Amidon //! \addtogroup SpCol //! @{ //! Class for sparse column vectors (matrices with only one column) template class SpCol : public SpMat { public: typedef eT elem_type; typedef typename get_pod_type::result pod_type; static const bool is_row = false; static const bool is_col = true; inline SpCol(); inline explicit SpCol(const uword n_elem); inline SpCol(const uword in_rows, const uword in_cols); inline SpCol(const char* text); inline const SpCol& operator=(const char* text); inline SpCol(const std::string& text); inline const SpCol& operator=(const std::string& text); inline const SpCol& operator=(const eT val); template inline SpCol(const Base& X); template inline const SpCol& operator=(const Base& X); template inline SpCol(const SpBase& X); template inline const SpCol& operator=(const SpBase& X); template inline explicit SpCol(const SpBase& A, const SpBase& B); inline void shed_row (const uword row_num); inline void shed_rows(const uword in_row1, const uword in_row2); // inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero = true); typedef typename SpMat::iterator row_iterator; typedef typename SpMat::const_iterator const_row_iterator; inline row_iterator begin_row(const uword row_num = 0); inline const_row_iterator begin_row(const uword row_num = 0) const; inline row_iterator end_row (const uword row_num = 0); inline const_row_iterator end_row (const uword row_num = 0) const; #ifdef ARMA_EXTRA_SPCOL_PROTO #include ARMA_INCFILE_WRAP(ARMA_EXTRA_SPCOL_PROTO) #endif };