podarray_bones.hpp
Go to the documentation of this file.
1 // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
2 // Copyright (C) 2008-2010 Conrad Sanderson
3 //
4 // This file is part of the Armadillo C++ library.
5 // It is provided without any warranty of fitness
6 // for any purpose. You can redistribute this file
7 // and/or modify it under the terms of the GNU
8 // Lesser General Public License (LGPL) as published
9 // by the Free Software Foundation, either version 3
10 // of the License or (at your option) any later version.
11 // (see http://www.opensource.org/licenses for more info)
12 
13 
16 
17 
18 
20  {
21  static const uword val = 16;
22  };
23 
24 
25 
27 
28 template<typename eT>
29 class podarray
30  {
31  public:
32 
34  arma_aligned const eT* const mem;
35 
36 
37  protected:
40 
41 
42  public:
43 
44  inline ~podarray();
45  inline podarray();
46 
47  inline podarray (const podarray& x);
48  inline const podarray& operator=(const podarray& x);
49 
50  arma_inline explicit podarray(const uword new_N);
51 
52  arma_inline explicit podarray(const eT* X, const uword new_N);
53 
54  arma_inline eT& operator[] (const uword i);
55  arma_inline eT operator[] (const uword i) const;
56 
57  arma_inline eT& operator() (const uword i);
58  arma_inline eT operator() (const uword i) const;
59 
60  inline void set_size(const uword new_n_elem);
61  inline void reset();
62 
63  inline void fill(const eT val);
64 
65  inline void zeros();
66  inline void zeros(const uword new_n_elem);
67 
68  arma_inline eT* memptr();
69  arma_inline const eT* memptr() const;
70 
71  arma_hot inline void copy_row(const Mat<eT>& A, const uword row);
72 
73  protected:
74 
75  inline void init(const uword new_n_elem);
76 
77  };
78 
79 
80 
arma_aligned const uword n_elem
number of elements held
A lightweight array for POD types. If the amount of memory requested is small, the stack is used...
static const uword val
u32 uword
Definition: typedef.hpp:85
#define arma_aligned
Dense matrix class.
#define arma_inline
arma_inline const Gen< vec::elem_type, gen_zeros > zeros(const uword n_elem)
Generate a vector with all elements set to zero.
Definition: fn_zeros.hpp:21
arma_aligned const eT *const mem
pointer to memory used by the object
#define arma_hot


armadillo_matrix
Author(s):
autogenerated on Fri Apr 16 2021 02:31:58