Functions
contrib/mul/m23d/m23d_set_q_constraint.cxx File Reference

Functions to construct linear constraints as rows in a matrix. More...

#include "m23d_set_q_constraint.h"
#include <vcl_algorithm.h>
#include <vcl_cassert.h>

Go to the source code of this file.

Functions

void m23d_set_q_constraint1 (vnl_matrix< double > &A, vnl_vector< double > &rhs, unsigned c, const vnl_vector< double > &a, const vnl_vector< double > &b, double r)
 Defines constraint on elements of Q of form a'Qb=r.
void m23d_set_q_constraint2 (vnl_matrix< double > &A, vnl_vector< double > &rhs, unsigned c, const vnl_vector< double > &a, const vnl_vector< double > &b)
 Defines constraint on elements of Q of form aQa'-bQb'=0.
void m23d_set_q_constraints (const vnl_matrix< double > &M, unsigned k, vnl_matrix< double > &A, vnl_vector< double > &rhs)
 Generate matrix of all constraints on elements of Q.

Detailed Description

Functions to construct linear constraints as rows in a matrix.

Author:
Tim Cootes

Definition in file m23d_set_q_constraint.cxx.


Function Documentation

void m23d_set_q_constraint1 ( vnl_matrix< double > &  A,
vnl_vector< double > &  rhs,
unsigned  c,
const vnl_vector< double > &  a,
const vnl_vector< double > &  b,
double  r 
)

Defines constraint on elements of Q of form a'Qb=r.

Q is a symmetric matrix, with n(n+1)/2 independent elements The constraints on these elements are placed in row c of A

Definition at line 13 of file m23d_set_q_constraint.cxx.

void m23d_set_q_constraint2 ( vnl_matrix< double > &  A,
vnl_vector< double > &  rhs,
unsigned  c,
const vnl_vector< double > &  a,
const vnl_vector< double > &  b 
)

Defines constraint on elements of Q of form aQa'-bQb'=0.

Q is a symmetric matrix, with n(n+1)/2 independent elements The constraints on these elements are placed in row c of A

Definition at line 34 of file m23d_set_q_constraint.cxx.

void m23d_set_q_constraints ( const vnl_matrix< double > &  M,
unsigned  k,
vnl_matrix< double > &  A,
vnl_vector< double > &  rhs 
)

Generate matrix of all constraints on elements of Q.

Q symmetric, encoded using elements i,j<=i in the vector q q obtained by solving Aq=rhs

Definition at line 53 of file m23d_set_q_constraint.cxx.