Xmipp  v3.23.11-Nereus
MatrixTriangle.h
Go to the documentation of this file.
1 /*
2 
3 CONDOR 1.06 - COnstrained, Non-linear, Direct, parallel Optimization
4  using trust Region method for high-computing load,
5  noisy functions
6 Copyright (C) 2004 Frank Vanden Berghen
7 
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation version 2
11 of the License.
12 
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 
22 If you want to include this tools in any commercial product,
23 you can contact the author at fvandenb@iridia.ulb.ac.be
24 
25 */
26 
27 #ifndef _MATRIXTRIANGLE_H
28 #define _MATRIXTRIANGLE_H
29 
30 #include "Vector.h"
31 
32 class Matrix;
33 
34 class MatrixTriangle // lower triangular
35 {
36  friend class Matrix;
37  protected:
38  void destroyCurrentBuffer();
39  typedef struct MatrixTriangleDataTag
40  {
41  int n;
42  int ext;
43  int ref_count;
44  double **p;
47 
48  public:
49 
50 // creation & management of Matrix:
51  MatrixTriangle(int _n=0);
52  void setSize(int _n);
53 
54 // allow shallow copy:
59  void copyFrom(MatrixTriangle r);
60 
61 // accessor method
62  inline bool operator==( const MatrixTriangle& A ) { return (A.d==d);}
63  inline int nLine() { return d->n; };
64  inline double *operator [](int i) { return d->p[i]; };
65  inline operator double**() const { return d->p; };
66 
67 // simple math tools:
68  void solveInPlace(Vector b);
70  //void invert();
71  void LINPACK(Vector &u);
72 
73 // default return matrix in case of problem in a function
75 };
76 
77 #endif
MatrixTriangleData * d
void copyFrom(MatrixTriangle r)
Definition: Vector.h:37
static double * y
MatrixTriangle & operator=(const MatrixTriangle &A)
MatrixTriangle clone()
double * operator[](int i)
#define i
void solveTransposInPlace(Vector y)
doublereal * b
bool operator==(const MatrixTriangle &A)
MatrixTriangle(int _n=0)
void solveInPlace(Vector b)
static MatrixTriangle emptyMatrixTriangle
Definition: Matrix.h:38
void LINPACK(Vector &u)
doublereal * u
void destroyCurrentBuffer()
struct MatrixTriangle::MatrixTriangleDataTag MatrixTriangleData
void setSize(int _n)