xc
Indices3dArray.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 //Indices3dArray.h
22 //Vector de matrices de puntos
23 
24 #ifndef TRITRIZINDICES_H
25 #define TRITRIZINDICES_H
26 
27 #include "utility/matrices/IndicesMatrix.h"
28 
30 //
32 class Indices3dArray: public std::vector<IndicesMatrix >
33  {
34  public:
35  typedef IndicesMatrix m_indices;
36  typedef IndicesMatrix::reference reference;
37  typedef IndicesMatrix::const_reference const_reference;
38 
39  protected:
40  inline IndicesMatrix &get_capa(const size_t &capa)
41  { return (*this)[capa-1]; }
42  inline const IndicesMatrix &get_capa(const size_t &capa) const
43  { return (*this)[capa-1]; }
44  public:
45  Indices3dArray(const size_t &capas= 1,const size_t &n_rows= 1,const size_t &n_cols= 1);
46  inline size_t getNumberOfLayers(void) const
47  { return this->size(); }
48  size_t getNumberOfRows(void) const;
49  size_t getNumberOfColumns(void) const;
50  size_t NumIndices(void) const;
51 
52  inline const IndicesMatrix &operator()(const size_t &capa) const
53  { return get_capa(capa); }
54  inline IndicesMatrix &operator()(const size_t &capa)
55  { return get_capa(capa); }
56  inline const VIndices &operator()(const size_t &i,const size_t &j,const size_t &k) const
57  { return get_capa(i)(j,k); }
58  inline VIndices &operator()(const size_t &i,const size_t &j,const size_t &k)
59  { return get_capa(i)(j,k); }
60 
61  void Offset(const VIndices &);
62  };
63 
64 
65 
66 #endif
void Offset(const VIndices &)
Agrega a todos los elementos el valor que is being passed as parameter.
Definition: Indices3dArray.cc:70
Definition: vectorZ.h:39
size_t getNumberOfColumns(void) const
Return the number of columns of the array.
Definition: Indices3dArray.cc:51
Clase base para las «tritrices» de posiciones.
Definition: Indices3dArray.h:32
size_t getNumberOfRows(void) const
Return the number of rows of the array.
Definition: Indices3dArray.cc:42
size_t NumIndices(void) const
Return the number of elements of the array.
Definition: Indices3dArray.cc:29
Matrix of indices.
Definition: IndicesMatrix.h:39