MiniTensor Version of the Day
Loading...
Searching...
No Matches
minitensor::Circle< S, NC, NV > Class Template Reference

#include <MiniTensor_TestFunctions.h>

Inheritance diagram for minitensor::Circle< S, NC, NV >:
minitensor::Inequality_Constraint< ConstraintDerived, S, NC, NV > minitensor::Equality_Constraint< ConstraintDerived, S, NC, NV >

Public Types

using Base = Inequality_Constraint< Circle< S, NC, NV >, S, NC, NV >
 

Public Member Functions

 Circle (S const r, S const xc=S(0.0), S const yc=S(0.0))
 
template<typename T , Index N = 2>
Vector< T, NC > value (Vector< T, N > const &x)
 
template<typename T , Index N = 2>
Matrix< T, NC, NV > gradient (Vector< T, N > const &x)
 
- Public Member Functions inherited from minitensor::Equality_Constraint< ConstraintDerived, S, NC, NV >
 Equality_Constraint ()
 
template<typename T , Index N>
Vector< T, NC > value (ConstraintDerived &c, Vector< T, N > const &x)
 
template<typename T , Index N>
Matrix< T, NC, NV > gradient (ConstraintDerived &c, Vector< T, N > const &x)
 

Static Public Attributes

static constexpr char const *const NAME {"Circle constraint"}
 
- Static Public Attributes inherited from minitensor::Inequality_Constraint< ConstraintDerived, S, NC, NV >
static constexpr bool IS_EQUALITY {false}
 
- Static Public Attributes inherited from minitensor::Equality_Constraint< ConstraintDerived, S, NC, NV >
static constexpr bool IS_EQUALITY {true}
 
static constexpr Index NUM_CONSTR {NC}
 
static constexpr Index NUM_VAR {NV}
 

Private Attributes

r_ {0.0}
 
Vector< S, NV > c_
 

Additional Inherited Members

- Public Attributes inherited from minitensor::Equality_Constraint< ConstraintDerived, S, NC, NV >
bool failed {false}
 

Detailed Description

template<typename S, Index NC = 1, Index NV = 2>
class minitensor::Circle< S, NC, NV >

Circle (disk) inequality constraint \( r^2 - \|x - c\|^2 \geq 0 \): the feasible set is the closed disk of radius \( r \) centered at \( c = (x_c, y_c) \).

Definition at line 1522 of file MiniTensor_TestFunctions.h.

Member Typedef Documentation

◆ Base

template<typename S , Index NC = 1, Index NV = 2>
using minitensor::Circle< S, NC, NV >::Base = Inequality_Constraint<Circle<S, NC, NV>, S, NC, NV>

Base class type.

Definition at line 1548 of file MiniTensor_TestFunctions.h.

Constructor & Destructor Documentation

◆ Circle()

template<typename S , Index NC = 1, Index NV = 2>
minitensor::Circle< S, NC, NV >::Circle ( S const  r,
S const  xc = S(0.0),
S const  yc = S(0.0) 
)
inline

Constructor.

Parameters
rRadius of the disk.
xcFirst coordinate of the center.
ycSecond coordinate of the center.

Definition at line 1532 of file MiniTensor_TestFunctions.h.

Member Function Documentation

◆ value()

template<typename S , Index NC = 1, Index NV = 2>
template<typename T , Index N = 2>
Vector< T, NC > minitensor::Circle< S, NC, NV >::value ( Vector< T, N > const &  x)
inline

Constraint value.

Definition at line 1556 of file MiniTensor_TestFunctions.h.

◆ gradient()

template<typename S , Index NC = 1, Index NV = 2>
template<typename T , Index N = 2>
Matrix< T, NC, NV > minitensor::Circle< S, NC, NV >::gradient ( Vector< T, N > const &  x)
inline

Gradient (Jacobian) of the constraint.

Definition at line 1574 of file MiniTensor_TestFunctions.h.

Member Data Documentation

◆ NAME

template<typename S , Index NC = 1, Index NV = 2>
constexpr char const* const minitensor::Circle< S, NC, NV >::NAME {"Circle constraint"}
staticconstexpr

Function name.

Definition at line 1543 of file MiniTensor_TestFunctions.h.

◆ r_

template<typename S , Index NC = 1, Index NV = 2>
S minitensor::Circle< S, NC, NV >::r_ {0.0}
private

Radius of the disk.

Definition at line 1584 of file MiniTensor_TestFunctions.h.

◆ c_

template<typename S , Index NC = 1, Index NV = 2>
Vector<S, NV> minitensor::Circle< S, NC, NV >::c_
private

Center of the disk.

Definition at line 1590 of file MiniTensor_TestFunctions.h.


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