injector_bones.hpp
Go to the documentation of this file.
1 // Copyright (C) 2010 NICTA (www.nicta.com.au)
2 // Copyright (C) 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 
19 template<typename eT>
21  {
22  public:
23 
24  inline mat_injector_row();
25 
26  inline void insert(const eT val) const;
27 
28  mutable uword n_cols;
29  mutable podarray<eT> A;
30  mutable podarray<eT> B;
31  };
32 
33 
34 
35 template<typename T1>
37  {
38  public:
39 
40  typedef typename T1::elem_type elem_type;
41 
42  inline void insert(const elem_type val) const;
43  inline void end_of_row() const;
44  inline ~mat_injector();
45 
46 
47  private:
48 
49  inline mat_injector(T1& in_X, const elem_type val);
50  inline mat_injector(T1& in_X, const injector_end_of_row& x);
51 
52  T1& X;
53  mutable uword n_rows;
54 
57 
58  friend class Mat<elem_type>;
59  friend class Row<elem_type>;
60  friend class Col<elem_type>;
61  };
62 
63 
64 
65 //
66 
67 
68 
69 template<typename oT>
71  {
72  public:
73 
74  inline field_injector_row();
75  inline ~field_injector_row();
76 
77  inline void insert(const oT& val) const;
78 
79  mutable uword n_cols;
80  mutable field<oT>* AA;
81  mutable field<oT>* BB;
82  };
83 
84 
85 
86 template<typename T1>
88  {
89  public:
90 
91  typedef typename T1::object_type object_type;
92 
93  inline void insert(const object_type& val) const;
94  inline void end_of_row() const;
95  inline ~field_injector();
96 
97 
98  private:
99 
100  inline field_injector(T1& in_X, const object_type& val);
101  inline field_injector(T1& in_X, const injector_end_of_row& x);
102 
103  T1& X;
104  mutable uword n_rows;
105 
108 
109  friend class field<object_type>;
110  };
111 
112 
113 
A lightweight array for POD types. If the amount of memory requested is small, the stack is used...
podarray< eT > A
T1::object_type object_type
podarray< mat_injector_row< elem_type > * > * AA
podarray< eT > B
u32 uword
Definition: typedef.hpp:85
podarray< field_injector_row< object_type > * > * AA
Class for column vectors (matrices with only one column)
Definition: Col_bones.hpp:20
podarray< mat_injector_row< elem_type > * > * BB
podarray< field_injector_row< object_type > * > * BB
Class for row vectors (matrices with only one row)
Dense matrix class.
void insert(const eT val) const
T1::elem_type elem_type


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