MatrixFlag.hxx
1 // Copyright (C) 2001-2010 Vivien Mallet
2 //
3 // This file is part of the linear-algebra library Seldon,
4 // http://seldon.sourceforge.net/.
5 //
6 // Seldon is free software; you can redistribute it and/or modify it under the
7 // terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 2.1 of the License, or (at your option)
9 // any later version.
10 //
11 // Seldon is distributed in the hope that it will be useful, but WITHOUT ANY
12 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
14 // more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public License
17 // along with Seldon. If not, see http://www.gnu.org/licenses/.
18 
19 
20 #ifndef SELDON_FILE_SHARE_MATRIXFLAG_HXX
21 
22 
23 namespace Seldon
24 {
25 
26 
28  // SELDONTRANSPOSE //
30 
31 
33  {
34  protected:
35  CBLAS_TRANSPOSE cblas_status_;
36 
37  protected:
38  // 0: Trans, 1: NoTrans, 2: ConjTrans.
39  int status_;
40 
41  public:
42  explicit SeldonTranspose(int status);
43  explicit SeldonTranspose(const enum CBLAS_TRANSPOSE status);
44 
45  CBLAS_TRANSPOSE Cblas() const;
46 
47  char Char() const;
48  char RevChar() const;
49  bool Trans() const;
50  bool NoTrans() const;
51  bool ConjTrans() const;
52  };
53 
54 
56  {
57  public:
59  };
60 
61 
63  {
64  public:
66  };
67 
68 
70  {
71  public:
73  };
74 
75 
76  extern class_SeldonTrans SeldonTrans;
77  extern class_SeldonNoTrans SeldonNoTrans;
78  extern class_SeldonConjTrans SeldonConjTrans;
79 
80 
82  // SELDONDIAG //
84 
85 
86  class SeldonDiag
87  {
88  protected:
89  CBLAS_DIAG cblas_status_;
90 
91  protected:
92  // 0: NonUnit, 1: Unit.
93  int status_;
94 
95  public:
96  explicit SeldonDiag(int status);
97 
98  CBLAS_DIAG Cblas() const;
99 
100  char Char() const;
101  bool NonUnit() const;
102  bool Unit() const;
103  };
104 
105 
107  {
108  public:
110  };
111 
112 
114  {
115  public:
117  };
118 
119 
120  extern class_SeldonNonUnit SeldonNonUnit;
121  extern class_SeldonUnit SeldonUnit;
122 
123 
125  // SELDONUPLO //
127 
128 
130  {
131  protected:
132  CBLAS_UPLO cblas_status_;
133 
134  protected:
135  // 0: Upper, 1: Lower.
136  int status_;
137 
138  public:
139  explicit SeldonUplo(int status);
140 
141  CBLAS_UPLO Cblas() const;
142  bool Upper() const;
143  bool Lower() const;
144  char Char() const;
145  char RevChar() const;
146  };
147 
148 
149  extern SeldonUplo SeldonUpper;
150  extern SeldonUplo SeldonLower;
151 
152 
154  // SELDONNORM //
156 
157 
159  {
160  protected:
161  // 0: Infinity-norm, 1: 1-norm.
162  int status_;
163 
164  public:
165  explicit SeldonNorm(int status);
166  char Char() const;
167  char RevChar() const;
168  };
169 
170 
171  extern SeldonNorm SeldonNormInf;
172  extern SeldonNorm SeldonNorm1;
173 
174 
176  // SELDONCONJUGATE //
178 
179 
181  {
182  protected:
183  // false: Unconj, true: Conj.
184  bool status_;
185 
186  public:
187  explicit SeldonConjugate(bool status);
188  bool Conj() const;
189  };
190 
191 
192  extern SeldonConjugate SeldonUnconj;
193  extern SeldonConjugate SeldonConj;
194 
195 
197  // SELDONSIDE //
199 
200 
202  {
203  protected:
204  CBLAS_SIDE cblas_status_;
205 
206  protected:
207  // 0: Left, 1: Right.
208  int status_;
209 
210  public:
211  explicit SeldonSide(int status);
212 
213  explicit SeldonSide(const enum CBLAS_SIDE status);
214  CBLAS_SIDE Cblas() const;
215  char Char() const;
216  char RevChar() const;
217  bool Left() const;
218  bool Right() const;
219  };
220 
221 
223  {
224  public:
226  };
227 
228 
230  {
231  public:
233  };
234 
235 
236  extern class_SeldonLeft SeldonLeft;
237  extern class_SeldonRight SeldonRight;
238 
239 
240 }
241 
242 
243 #define SELDON_FILE_SHARE_MATRIXFLAG_HXX
244 #endif
Seldon::SeldonTranspose
Definition: MatrixFlag.hxx:32
Seldon::SeldonConjugate
Definition: MatrixFlag.hxx:180
Seldon::class_SeldonNoTrans
Definition: MatrixFlag.hxx:62
Seldon::SeldonNorm
Definition: MatrixFlag.hxx:158
Seldon::SeldonDiag
Definition: MatrixFlag.hxx:86
Seldon::class_SeldonTrans
Definition: MatrixFlag.hxx:55
Seldon::class_SeldonNonUnit
Definition: MatrixFlag.hxx:106
Seldon::class_SeldonConjTrans
Definition: MatrixFlag.hxx:69
Seldon::class_SeldonRight
Definition: MatrixFlag.hxx:229
Seldon::SeldonSide
Definition: MatrixFlag.hxx:201
Seldon::SeldonUplo
Definition: MatrixFlag.hxx:129
Seldon::class_SeldonUnit
Definition: MatrixFlag.hxx:113
Seldon
Seldon namespace.
Definition: Array.cxx:24
Seldon::class_SeldonLeft
Definition: MatrixFlag.hxx:222