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

#include <MiniTensor_TestFunctions.h>

Inheritance diagram for minitensor::Circumference< S, NC, NV >:
minitensor::Equality_Constraint< Circumference< S, 1, 2 >, S, 1, 2 >

Public Types

using Base = Equality_Constraint<Circumference<S, NC, NV>, S, NC, NV>

Public Member Functions

 Circumference (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< Circumference< S, 1, 2 >, S, 1, 2 >
 Equality_Constraint ()
Vector< T, NC > value (Circumference< S, 1, 2 > &c, Vector< T, N > const &x)
Matrix< T, NC, NV > gradient (Circumference< S, 1, 2 > &c, Vector< T, N > const &x)

Static Public Attributes

static constexpr char const *const NAME {"Circumference"}
Static Public Attributes inherited from minitensor::Equality_Constraint< Circumference< S, 1, 2 >, S, 1, 2 >
static constexpr bool IS_EQUALITY
static constexpr Index NUM_CONSTR
static constexpr Index NUM_VAR

Private Attributes

S r_ {0.0}
Vector< S, NV > c_

Additional Inherited Members

Public Attributes inherited from minitensor::Equality_Constraint< Circumference< S, 1, 2 >, S, 1, 2 >
bool failed

Detailed Description

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

Circumference equality constraint \( r^2 - \|x - c\|^2 = 0 \): the feasible set is the circle of radius \( r \) centered at \( c = (x_c, y_c) \).

Definition at line 1441 of file MiniTensor_TestFunctions.h.

Member Typedef Documentation

◆ Base

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

Base class type.

Definition at line 1467 of file MiniTensor_TestFunctions.h.

Constructor & Destructor Documentation

◆ Circumference()

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

Constructor.

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

Definition at line 1451 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::Circumference< S, NC, NV >::value ( Vector< T, N > const & x)
inline

Constraint value.

Definition at line 1475 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::Circumference< S, NC, NV >::gradient ( Vector< T, N > const & x)
inline

Gradient (Jacobian) of the constraint.

Definition at line 1493 of file MiniTensor_TestFunctions.h.

Member Data Documentation

◆ NAME

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

Function name.

Definition at line 1462 of file MiniTensor_TestFunctions.h.

◆ r_

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

Radius of the circumference.

Definition at line 1503 of file MiniTensor_TestFunctions.h.

◆ c_

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

Center of the circumference.

Definition at line 1509 of file MiniTensor_TestFunctions.h.


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