STK++ 0.9.13
STK_Arrays_Util.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------*/
2/* Copyright (C) 2004-2016 Serge Iovleff
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this program; if not, write to the
16 Free Software Foundation, Inc.,
17 59 Temple Place,
18 Suite 330,
19 Boston, MA 02111-1307
20 USA
21
22 Contact : S..._Dot_I..._At_stkpp_Dot_org (see copyright for ...)
23*/
24
25/*
26 * Project: stkpp::Arrays
27 * created on: 17 févr. 2012
28 * Author: iovleff, S..._Dot_I..._At_stkpp_Dot_org (see copyright for ...)
29 **/
30
36#ifndef STK_ARRAY_UTIL_H
37#define STK_ARRAY_UTIL_H
38
39namespace STK
40{
41
42namespace Arrays
43{
44
49{
50 _0D_ = 0,
51 _1D_ = 1,
52 _2D_ = 2,
53 _3D_ = 3,
54 _4D_ = 4
55};
60{
62 by_col_ =1
63};
64
69{
70 dense_ =1,
71 sparse_=0
72};
73
92
128
186
200
207{
208 if (type == array2D_) return String(_T("array2D"));
209 if (type == square_) return String(_T("square"));
210 if (type == diagonal_) return String(_T("diagonal"));
211 if (type == lower_triangular_) return String(_T("lower_triangular"));
212 if (type == upper_triangular_) return String(_T("upper_triangular"));
213 if (type == symmetric_) return String(_T("symmetric"));
214 if (type == lower_symmetric_) return String(_T("lower_symmetric"));
215 if (type == upper_symmetric_) return String(_T("upper_symmetric"));
216 if (type == vector_) return String(_T("vector"));
217 if (type == point_) return String(_T("point"));
218 if (type == number_) return String(_T("number"));
219 if (type == expression_) return String(_T("expression"));
220 return String(_T("unknown"));
221}
222
223
224} // namespace Arrays
225
226} // namespace STK
227
228
229
230#endif /* STK_ARRAY_UTIL_H */
#define _T(x)
Let x unmodified.
Storage
Define the different type of Array that can be handle by STK++.
Structure
structures of Arrays that can be handled by STK++
Dimension
Intrinsic dimension of the container : 0D, 1D, 2D, 3D or 4D.
String structureToString(Structure const &type)
convert an Arrays::Structure to a String.
BinaryOperatorType
Kind of operators leading to a BinaryOperator or UnaryOperator.
RangeOpUse
Allow to disambiguate which rows() or cols() methods must be used which array to use when calling row...
BinaryOpKind
Kind of operands in a BinaryOperator.
Orientation
Define the Storage Orientation of the container.
@ sparse_
sparse matrix/vector/array/expression
@ dense_
dense matrix/vector/array/expression
@ array2D_
general matrix/array/expression
@ number_
(1,1) matrix/vector/array/expression (like a number)
@ point_
row oriented vector/array/expression
@ lower_symmetric_
lower symmetric matrix/array/expression
@ lower_triangular_
lower triangular matrix/array/expression
@ expression_
An expression that will be evaluated further.
@ symmetric_
symmetric matrix/array/expression
@ upper_triangular_
upper triangular matrix/array/expression
@ diagonal_
diagonal matrix/array/expression
@ upper_symmetric_
upper symmetric matrix/array/expression
@ vector_
column oriented vector/array/expression
@ square_
square matrix/array/expression
@ _0D_
a single scalar have no dimension
@ greaterThanOrEqualOp_
operator>=
@ minOp_
min operator
@ moduloOp_
operator%
@ sumOp_
operator+
@ bitwiseOrOp_
operator|
@ bitwiseXorOp_
operator^
@ logicalOrOp_
operator||
@ bitwiseAndOp_
operator&
@ maxOp_
max operator
@ lessThanOp_
operator<
@ notEqualOp_
operator!=
@ lessThanOrEqualOp_
operator<=
@ differenceOp_
operator-
@ greaterThanOp_
operator>
@ productOp_
operator*
@ logicalAndOp_
operator&&
@ divisionOp_
operator/
@ equalOp_
operator==
@ useLhsOtherSize_
if true, use lhs.cols() in order to get rows() and lhs.rows() in order to get cols()
@ useRhsOtherSize_
if true, use rhs.cols() in order to get rows() and rhs.rows() in order to get cols()
@ useLhsSize_
use lhs.rows() (resp. lhs.cols()) in order to get rows() (resp. cols())
@ useRhsSize_
use rhs.rows() (resp. rhs.cols()) in order to get rows() (resp. cols())
@ useRhsRange_
use rhs.range() in order to get range()
@ useLhsRange_
use lhs.range() in order to get range()
@ binary_op_1D_
both operand are vector or point or diagonal
@ binary_op_LowTri_2D_
left operand is lower triangular, right operand is 2D
@ binary_op_Diag_2D_
left operand is diagonal, right operand is 2D
@ binary_op_LowSym_2D_
left operand is lower symmetric, right operand is 2D
@ binary_op_2D_Diag_
left operand is 2D, right operand is diagonal
@ binary_op_Sym_2D_
left operand is symmetric, right operand is 2D
@ binary_op_UpTri_2D_
left operand is upper triangular, right operand is 2D
@ binary_op_2D_
both operand are array2d or square
@ binary_op_UpSym_2D_
left operand is upper symmetric, right operand is 2D
@ binary_op_0D_
both operand are number_
@ by_row_
storage by row
@ by_col_
storage by column
std::basic_string< Char > String
STK fundamental type of a String.
The namespace STK is the main domain space of the Statistical ToolKit project.