b2api
B2000++ API Reference Manual, VERSION 4.6
 
Loading...
Searching...
No Matches
b2linear_algebra_def.H
1//------------------------------------------------------------------------
2// b2linear_algebra_def.H --
3//
4// A framework for generic linear algebraic (matrix) computations.
5//
6// written by Mathias Doreille
7//
8// Copyright (c) 2004-2012 SMR Engineering & Development SA
9// 2502 Bienne, Switzerland
10//
11// All Rights Reserved. Proprietary source code. The contents of
12// this file may not be disclosed to third parties, copied or
13// duplicated in any form, in whole or in part, without the prior
14// written permission of SMR.
15//------------------------------------------------------------------------
16
17#ifndef __B2LINEAR_ALGEBRA_DEF_H__
18#define __B2LINEAR_ALGEBRA_DEF_H__
19
20// #include <cstddef>
21
22namespace b2000::b2linalg {
23
24// using std::size_t;
25
26template <typename T1, typename T2>
27struct Sum;
28template <typename T1, typename T2>
29struct MVProd;
30template <typename T1, typename T2>
31struct MMProd;
32
33struct Vdense;
34struct Vdense_ref;
35struct Vdense_constref;
36struct Vincrement_ref;
37struct Vincrement_constref;
38struct Vincrement_scale_constref;
39struct Vindex_ref;
40struct Vindex_constref;
41struct Vindex_scale_constref;
42struct Vcompressed;
43struct Vcompressed_scale_constref;
44
45template <typename T, typename STORAGE = Vdense>
46class Vector;
47
48struct Mrectangle;
49struct Mrectangle_inv;
50struct Mrectangle_ref;
51struct Mrectangle_constref;
52struct Mrectangle_increment_ref;
53struct Mrectangle_increment_constref;
54struct Mrectangle_increment_st_constref;
55
56struct Mupper_packed;
57struct Mupper_packed_ref;
58struct Mupper_packed_constref;
59struct Mlower_packed;
60struct Mlower_packed_ref;
61struct Mlower_packed_constref;
62struct Mpacked;
63struct Mpacked_ref;
64struct Mpacked_st_constref;
65
66struct Mcompressed_col;
67struct Mcompressed_col_ref;
68struct Mcompressed_col_constref;
69struct Mcompressed_col_st_constref;
70
71struct Mcompressed_col_update_inv;
72struct Mcompressed_col_update_sub_ref;
73struct Mcompressed_col_update_inv_ext;
74
75struct Msym_compressed_col;
76struct Msym_compressed_col_ref;
77struct Msym_compressed_col_constref;
78struct Msym_compressed_col_st_constref;
79
80struct Msym_compressed_col_update_inv;
81struct Msym_compressed_col_update_sub_ref;
82struct Msym_compressed_col_update_inv_ext;
83template <typename MTYPE>
84struct Minverse_constref;
85template <typename MTYPE>
86struct Minverse_ext_constref;
87template <typename ATYPE, typename BTYPE>
88struct Eigenvector;
89template <typename ATYPE, typename BTYPE>
90struct PolyEigenvector;
91template <typename MTYPE>
92struct Mstructured_constref;
93template <typename MTYPE, typename INDEX1, typename INDEX2>
94struct Msub_constref;
95
96template <typename T, typename STORAGE = Mrectangle>
97class Matrix;
98
99struct Munsymmetric {
100 typedef Mrectangle dense;
101 typedef Mcompressed_col sparse;
102 typedef Mcompressed_col_update_inv sparse_inversible;
103 typedef Mcompressed_col_update_inv_ext sparse_inversible_ext;
104 static const bool symmetric = false;
105};
106
107struct Msymmetric {
108 typedef Mpacked dense;
109 typedef Msym_compressed_col sparse;
110 typedef Msym_compressed_col_update_inv sparse_inversible;
111 typedef Msym_compressed_col_update_inv_ext sparse_inversible_ext;
112 static const bool symmetric = true;
113};
114
115enum SparseMatrixConnectivityType {
116 sparse_matrix_connectivity_unknown = 0,
117 sparse_matrix_connectivity_2D = 1,
118 sparse_matrix_connectivity_3D = 2,
119 sparse_matrix_connectivity_2D_and_3D = 3
120};
121
122template <typename T>
123class TemporaryBuffer;
124
125#define MVFRIEND \
126 template <typename T_FRIEND, typename STORAGE_FRIEND> \
127 friend class Vector; \
128 template <typename T_FRIEND, typename STORAGE_FRIEND> \
129 friend class Matrix
130
131} // namespace b2000::b2linalg
132#endif