MeshLib Documentation
Loading...
Searching...
No Matches
MR::QuadraticForm< V > Struct Template Reference

#include <MRQuadraticForm.h>

Public Types

using T = typename V::ValueType
 
using SM = typename V::SymMatrixType
 

Public Member Functions

T eval (const V &x) const
 evaluates the function at given x
 
void addDistToOrigin (T weight)
 adds to this squared distance to the origin point
 
void addDistToPlane (const V &planeUnitNormal)
 adds to this squared distance to plane passing via origin with given unit normal
 
void addDistToPlane (const V &planeUnitNormal, T weight)
 
void addDistToLine (const V &lineUnitDir)
 adds to this squared distance to line passing via origin with given unit direction
 
void addDistToLine (const V &lineUnitDir, T weight)
 

Public Attributes

SM A
 
T c = 0
 

Related Symbols

(Note that these are not member symbols.)

template<typename V >
MRMESH_API std::pair< QuadraticForm< V >, V > sum (const QuadraticForm< V > &q0, const V &x0, const QuadraticForm< V > &q1, const V &x1, bool minAmong01=false)
 if true then the minimum is selected only between points x0 and x1
 
template<typename V >
MRMESH_API QuadraticForm< V > sumAt (const QuadraticForm< V > &q0, const V &x0, const QuadraticForm< V > &q1, const V &x1, const V &pos)
 

Detailed Description

template<typename V>
struct MR::QuadraticForm< V >

quadratic form: f = x^T A x + c

Member Typedef Documentation

◆ SM

template<typename V >
using MR::QuadraticForm< V >::SM = typename V::SymMatrixType

◆ T

template<typename V >
using MR::QuadraticForm< V >::T = typename V::ValueType

Member Function Documentation

◆ addDistToLine() [1/2]

template<typename V >
void MR::QuadraticForm< V >::addDistToLine ( const V & lineUnitDir)
inline

adds to this squared distance to line passing via origin with given unit direction

◆ addDistToLine() [2/2]

template<typename V >
void MR::QuadraticForm< V >::addDistToLine ( const V & lineUnitDir,
T weight )
inline

◆ addDistToOrigin()

template<typename V >
void MR::QuadraticForm< V >::addDistToOrigin ( T weight)
inline

adds to this squared distance to the origin point

◆ addDistToPlane() [1/2]

template<typename V >
void MR::QuadraticForm< V >::addDistToPlane ( const V & planeUnitNormal)
inline

adds to this squared distance to plane passing via origin with given unit normal

◆ addDistToPlane() [2/2]

template<typename V >
void MR::QuadraticForm< V >::addDistToPlane ( const V & planeUnitNormal,
T weight )
inline

◆ eval()

template<typename V >
T MR::QuadraticForm< V >::eval ( const V & x) const
inlinenodiscard

evaluates the function at given x

Friends And Related Symbol Documentation

◆ sum()

template<typename V >
MRMESH_API std::pair< QuadraticForm< V >, V > sum ( const QuadraticForm< V > & q0,
const V & x0,
const QuadraticForm< V > & q1,
const V & x1,
bool minAmong01 = false )
related

if true then the minimum is selected only between points x0 and x1

given two quadratic forms with points where they reach minima, computes sum quadratic form and the point where it reaches minimum

◆ sumAt()

template<typename V >
MRMESH_API QuadraticForm< V > sumAt ( const QuadraticForm< V > & q0,
const V & x0,
const QuadraticForm< V > & q1,
const V & x1,
const V & pos )
related

given two quadratic forms with points where they reach minima, computes sum quadratic form and the point (pos)

Member Data Documentation

◆ A

template<typename V >
SM MR::QuadraticForm< V >::A

◆ c

template<typename V >
T MR::QuadraticForm< V >::c = 0

The documentation for this struct was generated from the following file: