23double similarity(
const LAVector &,
const LASymMatrix &);
34 double operator()(
unsigned int row,
unsigned int col)
const
56 assert(
v1.size() ==
v2.size());
58 for (
unsigned int i = 0; i <
v1.size(); ++i) {
59 for (
unsigned int j = 0; j <
v2.size(); ++j) {
60 a(i, j) =
v1[i] *
v2[j];
69 unsigned int n = m1.
Nrow();
70 assert(
n == m2.
Nrow());
72 for (
unsigned int i = 0; i <
n; ++i) {
73 for (
unsigned int j = 0; j <
n; ++j) {
75 for (
unsigned int k = 0; k <
n; ++k) {
76 a(i, j) += m1(i, k) * m2(k, j);
98 MnPrint print(
"BFGSErrorUpdator");
99 print.
Debug(
"dx", dx,
"dg", dg,
"delgam", delgam,
"gvg", gvg);
102 print.
Warn(
"delgam = 0 : cannot update - return same matrix");
107 print.
Warn(
"delgam < 0 : first derivatives increasing along search line");
112 print.
Warn(
"gvg <= 0");
123 unsigned int n =
v0.Nrow();
125 for (
unsigned int i = 0; i <
n; ++i) {
126 for (
unsigned int j = i; j <
n; ++j) {
127 v2(i, j) = (
b(i, j) +
b(j, i)) / (delgam);
139 print.
Debug(
"dcov", dcov);
MinimumError Update(const MinimumState &, const MinimumParameters &, const FunctionGradient &) const override
const MnAlgebraicVector & Vec() const
double operator()(unsigned int row, unsigned int col) const
std::vector< double > fData
unsigned int Nrow() const
double & operator()(unsigned int row, unsigned int col)
LASquareMatrix(unsigned int n)
Class describing a symmetric matrix of size n.
unsigned int Nrow() const
MinimumError keeps the inv.
const MnAlgebraicVector & Vec() const
MinimumState keeps the information (position, Gradient, 2nd deriv, etc) after one minimization step (...
void Debug(const Ts &... args)
void Warn(const Ts &... args)
ABObj< sym, VectorOuterProduct< ABObj< vec, LAVector, double >, double >, double > Outer_product(const ABObj< vec, LAVector, double > &obj)
LAPACK Algebra function specialize the Outer_product function for LAVector;.
double sum_of_elements(const LASymMatrix &)
double similarity(const LAVector &, const LASymMatrix &)
LASquareMatrix OuterProduct(const LAVector &v1, const LAVector &v2)
double inner_product(const LAVector &, const LAVector &)
LASquareMatrix MatrixProduct(const LASymMatrix &m1, const LASquareMatrix &m2)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...