xc
IndicesMatrix.h
1 //----------------------------------------------------------------------------
2 // biblioteca bibXCLcmd; bilioteca de comandos para el intérprete del lenguaje
3 // de entrada de datos.
4 //
5 // Copyright (C) Luis C. Pérez Tato
6 //
7 // XC utils is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // This software is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program.
19 // If not, see <http://www.gnu.org/licenses/>.
20 //----------------------------------------------------------------------------
21 //IndicesMatrix.h
22 //Matrix of indices
23 
24 #ifndef INDICESMATRIX_H
25 #define INDICESMATRIX_H
26 
27 #include "utility/matrices/TMatrix.h"
28 #include "utility/matrices/vectorZ.h"
29 #include "m_int.h"
30 
31 typedef vectorZ<int> VIndices;
32 
34 //
39 class IndicesMatrix: public TMatrix<VIndices,std::vector<VIndices > >
40  {
41  public:
43  protected:
44  IndicesMatrix(const IndicesMatrix &mp, size_t &f1, size_t &c1, size_t &f2, size_t &c2);
45  public:
46  IndicesMatrix(const size_t &f=1,const size_t &c=1,const VIndices &p= VIndices());
47  IndicesMatrix(const m_int &,const std::vector<VIndices > &);
48 
49  IndicesMatrix getBox(size_t f1, size_t c1, size_t f2, size_t c2) const;
50  IndicesMatrix getRow(size_t ) const;
51  IndicesMatrix getColumn(size_t ) const;
52 
53  void Offset(const VIndices &);
54  };
55 
56 
57 #endif
Definition: vectorZ.h:39
Matrix which element type has estructura de anillo respecto a las operaciones + y *...
Definition: ZMatrix.h:37
void Offset(const VIndices &)
Agrega a todos los miembros el valor que is being passed as parameter.
Definition: IndicesMatrix.cc:73
IndicesMatrix getRow(size_t) const
Return the iRow-th row.
Definition: IndicesMatrix.cc:64
IndicesMatrix getBox(size_t f1, size_t c1, size_t f2, size_t c2) const
Return the row cuyos índices is being passed as parameter.
Definition: IndicesMatrix.cc:60
Definition: TMatrix.h:37
IndicesMatrix getColumn(size_t) const
Return the iCol-th column.
Definition: IndicesMatrix.cc:68
Matrix of indices.
Definition: IndicesMatrix.h:39