Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
m23d_correction_matrix_error Class Reference

Computes error on constraints when computing correction matrix. More...

#include <m23d_correction_matrix_error.h>

Inheritance diagram for m23d_correction_matrix_error:
Inheritance graph
[legend]

List of all members.

Public Types

enum  UseGradient

Public Member Functions

 m23d_correction_matrix_error (const vnl_matrix< double > &A, const vnl_vector< double > &rhs, unsigned n_modes, unsigned k)
virtual void f (vnl_vector< double > const &g, vnl_vector< double > &fx)
 The main function.
virtual void gradf (vnl_vector< double > const &g, vnl_matrix< double > &jacobian)
 Calculate the Jacobian, given the parameter vector g.
void throw_failure ()
void clear_failure ()
void fdgradf (vnl_vector< double > const &x, vnl_matrix< double > &jacobian, double stepsize)
void ffdgradf (vnl_vector< double > const &x, vnl_matrix< double > &jacobian, double stepsize)
virtual void trace (int iteration, vnl_vector< double > const &x, vnl_vector< double > const &fx)
double rms (vnl_vector< double > const &x)
unsigned int get_number_of_unknowns () const
unsigned int get_number_of_residuals () const
bool has_gradient () const
bool vnl_discrete_diff_fwd (vnl_least_squares_function *lsf, double h, vnl_vector< double > const &x, vnl_matrix< double > &J)
bool vnl_discrete_diff_fwd (vnl_least_squares_function *lsf, vnl_vector< double > const &h, vnl_vector< double > const &x, vnl_matrix< double > &J)
bool vnl_discrete_diff_fwd (vnl_least_squares_function *lsf, vnl_vector< double > const &h, vnl_vector< double > const &x, vnl_vector< double > const &y, vnl_matrix< double > &J)
bool vnl_discrete_diff_sym (vnl_least_squares_function *lsf, double h, vnl_vector< double > const &x, vnl_matrix< double > &J)
bool vnl_discrete_diff_sym (vnl_least_squares_function *lsf, vnl_vector< double > const &h, vnl_vector< double > const &x, vnl_matrix< double > &J)

Public Attributes

 no_gradient
 use_gradient
bool failure

Protected Member Functions

void init (unsigned int number_of_unknowns, unsigned int number_of_residuals)

Protected Attributes

unsigned int p_
unsigned int n_
bool use_gradient_

Private Member Functions

void compute_q (const vnl_vector< double > &g1, const vnl_vector< double > &g2, vnl_vector< double > &q)
 Compute q from supplied g.

Private Attributes

vnl_vector< double > q_
 Workspace for unique elements of symmetric matrix GG'.
vnl_matrix< double > A_
 Constraints on q.
vnl_vector< double > rhs_
 RHS for constraints on q (Aq=rhs).
vnl_vector< double > r_
 Workspace for residual vector.
unsigned n_modes_
 Number of model modes.
unsigned k_
 Current basis of interest.

Detailed Description

Computes error on constraints when computing correction matrix.

Given g, returns error vector (Aq-rhs), where vector q are the unique elements of the symmetric matrix Q=GG', G being the 3(m+1) x 3 matrix formed from the elements of the supplied vector g.

Definition at line 17 of file m23d_correction_matrix_error.h.


Constructor & Destructor Documentation

m23d_correction_matrix_error::m23d_correction_matrix_error ( const vnl_matrix< double > &  A,
const vnl_vector< double > &  rhs,
unsigned  n_modes,
unsigned  k 
)

Definition at line 10 of file m23d_correction_matrix_error.cxx.


Member Function Documentation

void m23d_correction_matrix_error::compute_q ( const vnl_vector< double > &  g1,
const vnl_vector< double > &  g2,
vnl_vector< double > &  q 
) [private]

Compute q from supplied g.

g1==g2 for full q, g2 = (0 0 ..1 ...0) when computing derivatives

g1==g2 for full q, g2 = (0 0 ..1 ...0) when computing derivatives q is set to the unique elements of G1.G2', where G1 and G2 are the 3*(m+1) x 3 matrices formed from the elements of g1 and g2.

Definition at line 28 of file m23d_correction_matrix_error.cxx.

void m23d_correction_matrix_error::f ( vnl_vector< double > const &  g,
vnl_vector< double > &  fx 
) [virtual]

The main function.

Given g, returns error vector fx=(Aq-rhs), where vector q are the unique elements of the symmetric matrix Q=GG', G being the 3(m+1) x 3 matrix formed from the elements of the supplied vector g.

Implements vnl_least_squares_function.

Definition at line 49 of file m23d_correction_matrix_error.cxx.

void m23d_correction_matrix_error::gradf ( vnl_vector< double > const &  g,
vnl_matrix< double > &  jacobian 
) [virtual]

Calculate the Jacobian, given the parameter vector g.

Reimplemented from vnl_least_squares_function.

Definition at line 59 of file m23d_correction_matrix_error.cxx.


Member Data Documentation

Constraints on q.

Definition at line 23 of file m23d_correction_matrix_error.h.

Current basis of interest.

Definition at line 35 of file m23d_correction_matrix_error.h.

Number of model modes.

Definition at line 32 of file m23d_correction_matrix_error.h.

Workspace for unique elements of symmetric matrix GG'.

Definition at line 20 of file m23d_correction_matrix_error.h.

Workspace for residual vector.

Definition at line 29 of file m23d_correction_matrix_error.h.

RHS for constraints on q (Aq=rhs).

Definition at line 26 of file m23d_correction_matrix_error.h.


The documentation for this class was generated from the following files: