Page MenuHomec4science

Cholesky.cpp
No OneTemporary

File Metadata

Created
Tue, Jun 11, 08:41

Cholesky.cpp

#include "Cholesky.hpp"
//Default constructor//
Cholesky::Cholesky(double **m_A, double *m_b, int m_size) {
A=m_A;
b=m_b;
size=m_size;
Cholesky_matrices Structure=Cholesky_L(A,b,size);
L=Structure.L_matrix;
L_T=Structure.L_T_matrix;
b_star=Structure.b_star_vector;
}
//Copy constructor//
Cholesky::Cholesky(const Cholesky &otherCholesky) {
A=otherCholesky.A;
b=otherCholesky.b;
b_star=otherCholesky.b_star;
size=otherCholesky.size;
L=otherCholesky.L;
L_T=otherCholesky.L_T;
}
double** Cholesky::get_L() {
return L;
}
double** Cholesky::get_L_T() {
return L_T;
}
double* Cholesky::get_b_star(){
return b_star;
}
double* Cholesky::Solve() {
double* z=Up(L_T,b_star,size);
return z;
}

Event Timeline