Class documentation of Concepts

Loading...
Searching...
No Matches
arrays.hh
Go to the documentation of this file.
1
7#ifndef arrays_hh
8#define arrays_hh
9
10#include "toolbox/array.hh"
11
12namespace concepts {
13
14 // ****************************************************** ArrayDeterminant **
15
20 template <class F, int dim>
21 class ArrayDeterminant : public Array<F> {
22 public:
24 Array<F>(array ? array->size() : 0) {
25 if (array) {
26 F* foo = data_;
27 const concepts::Mapping<F,dim>* matrix =
29 for(uint i = array->size(); i--;)
30 *foo++ = matrix++->determinant();
31 }
32 }
33 };
34
35 // **************************************************** ArrayMatrixInverse **
36
41 template <class F, int dim>
42 class ArrayMatrixInverse : public Array<concepts::Mapping<F,dim> > {
43 public:
47 if (array) {
49 const concepts::Mapping<F,dim>* matrix =
51 for(uint i = array->size(); i--;)
52 *foo++ = matrix++->inverse();
53 }
54 }
55 };
56
57 // ************************************************** ArrayMatrixTranspose **
58
64 template <class F, int dim>
65 class ArrayMatrixTranspose : public Array<concepts::Mapping<F, dim> > {
66 public:
70 if (array) {
72 const concepts::Mapping<F,dim>* matrix =
74 for(uint i = array->size(); i--;)
75 *foo++ = matrix++->transpose();
76 }
77 }
78 };
79
80 // ******************************************************* ArrayReciprocal **
81
86 template <class F>
87 class ArrayReciprocal : public Array<F> {
88 public:
90 Array<F>(array ? array->size() : 0) {
91 if (array) {
92 F* foo = data_; const F* a = *array;
93 for(uint i = array->size(); i--;)
94 *foo++ = 1.0 / *a++;
95 }
96 }
97 };
98
99 // ******************************************************* ArrayGramMatrix **
100
106 template <class F, int dim>
107 class ArrayGramMatrix : public Array<concepts::Mapping<F,dim> > {
108 public:
112 for(uint i = array.size(); i--;)
113 *foo++ = *matrix * matrix++->transpose();
114 }
115 };
116
117} // namespace concepts
118
119#endif
F * data_
Data.
Definition array.hh:273
Set< F > makeSet(uint n, const F &first,...)
Definition set.hh:320