Sleipnir Python API
Loading...
Searching...
No Matches
jormungandr.autodiff.Variable Class Reference

Public Member Functions

None __init__ (self)
 
None __init__ (self, float value)
 
None __init__ (self, int value)
 
None __init__ (self, VariableMatrix arg)
 
None set_value (self, float value)
 
None set_value (self, float value)
 
Variable __rmul__ (self, float lhs)
 
Variable __mul__ (self, float rhs)
 
Variable __mul__ (self, Variable rhs)
 
Variable __imul__ (self, float rhs)
 
Variable __imul__ (self, Variable rhs)
 
Variable __rtruediv__ (self, float lhs)
 
Variable __truediv__ (self, float rhs)
 
Variable __truediv__ (self, Variable rhs)
 
Variable __itruediv__ (self, float rhs)
 
Variable __itruediv__ (self, Variable rhs)
 
Variable __radd__ (self, float lhs)
 
Variable __add__ (self, float rhs)
 
Variable __add__ (self, Variable rhs)
 
Variable __iadd__ (self, float rhs)
 
Variable __iadd__ (self, Variable rhs)
 
Variable __rsub__ (self, float lhs)
 
Variable __sub__ (self, float rhs)
 
Variable __sub__ (self, Variable rhs)
 
Variable __isub__ (self, float rhs)
 
Variable __isub__ (self, Variable rhs)
 
Variable __pow__ (self, int power)
 
Variable __neg__ (self)
 
Variable __pos__ (self)
 
float value (self)
 
ExpressionType type (self)
 
EqualityConstraints __eq__ (self, Variable rhs)
 
EqualityConstraints __eq__ (self, float rhs)
 
EqualityConstraints __eq__ (self, float lhs)
 
InequalityConstraints __lt__ (self, Variable rhs)
 
InequalityConstraints __lt__ (self, float rhs)
 
InequalityConstraints __lt__ (self, float lhs)
 
InequalityConstraints __le__ (self, Variable rhs)
 
InequalityConstraints __le__ (self, float rhs)
 
InequalityConstraints __le__ (self, float lhs)
 
InequalityConstraints __gt__ (self, Variable rhs)
 
InequalityConstraints __gt__ (self, float rhs)
 
InequalityConstraints __gt__ (self, float lhs)
 
InequalityConstraints __ge__ (self, Variable rhs)
 
InequalityConstraints __ge__ (self, float rhs)
 
InequalityConstraints __ge__ (self, float lhs)
 

Detailed Description

An autodiff variable pointing to an expression node.

Constructor & Destructor Documentation

◆ __init__() [1/4]

None jormungandr.autodiff.Variable.__init__ (   self)
Constructs a linear Variable with a value of zero.

◆ __init__() [2/4]

None jormungandr.autodiff.Variable.__init__ (   self,
float  value 
)
Constructs an empty Variable.

◆ __init__() [3/4]

None jormungandr.autodiff.Variable.__init__ (   self,
int  value 
)
Constructs an empty Variable.

◆ __init__() [4/4]

None jormungandr.autodiff.Variable.__init__ (   self,
VariableMatrix  arg 
)

Member Function Documentation

◆ __add__() [1/2]

Variable jormungandr.autodiff.Variable.__add__ (   self,
float  rhs 
)

◆ __add__() [2/2]

Variable jormungandr.autodiff.Variable.__add__ (   self,
Variable  rhs 
)

◆ __eq__() [1/3]

EqualityConstraints jormungandr.autodiff.Variable.__eq__ (   self,
float  lhs 
)

◆ __eq__() [2/3]

EqualityConstraints jormungandr.autodiff.Variable.__eq__ (   self,
float  rhs 
)

◆ __eq__() [3/3]

EqualityConstraints jormungandr.autodiff.Variable.__eq__ (   self,
Variable  rhs 
)
Equality operator that returns an equality constraint for two
Variables.

Parameter ``lhs``:
    Left-hand side.

Parameter ``rhs``:
    Left-hand side.

◆ __ge__() [1/3]

InequalityConstraints jormungandr.autodiff.Variable.__ge__ (   self,
float  lhs 
)
Less-than-or-equal-to comparison operator that returns an inequality
constraint for two Variables.

Parameter ``lhs``:
    Left-hand side.

Parameter ``rhs``:
    Left-hand side.

◆ __ge__() [2/3]

InequalityConstraints jormungandr.autodiff.Variable.__ge__ (   self,
float  rhs 
)
Greater-than-or-equal-to comparison operator that returns an
inequality constraint for two Variables.

Parameter ``lhs``:
    Left-hand side.

Parameter ``rhs``:
    Left-hand side.

◆ __ge__() [3/3]

InequalityConstraints jormungandr.autodiff.Variable.__ge__ (   self,
Variable  rhs 
)
Greater-than-or-equal-to comparison operator that returns an
inequality constraint for two Variables.

Parameter ``lhs``:
    Left-hand side.

Parameter ``rhs``:
    Left-hand side.

◆ __gt__() [1/3]

InequalityConstraints jormungandr.autodiff.Variable.__gt__ (   self,
float  lhs 
)
Less-than comparison operator that returns an inequality constraint
for two Variables.

Parameter ``lhs``:
    Left-hand side.

Parameter ``rhs``:
    Left-hand side.

◆ __gt__() [2/3]

InequalityConstraints jormungandr.autodiff.Variable.__gt__ (   self,
float  rhs 
)
Greater-than comparison operator that returns an inequality constraint
for two Variables.

Parameter ``lhs``:
    Left-hand side.

Parameter ``rhs``:
    Left-hand side.

◆ __gt__() [3/3]

InequalityConstraints jormungandr.autodiff.Variable.__gt__ (   self,
Variable  rhs 
)
Greater-than comparison operator that returns an inequality constraint
for two Variables.

Parameter ``lhs``:
    Left-hand side.

Parameter ``rhs``:
    Left-hand side.

◆ __iadd__() [1/2]

Variable jormungandr.autodiff.Variable.__iadd__ (   self,
float  rhs 
)
Variable-Variable compound addition operator.

Parameter ``rhs``:
    Operator right-hand side.

◆ __iadd__() [2/2]

Variable jormungandr.autodiff.Variable.__iadd__ (   self,
Variable  rhs 
)

◆ __imul__() [1/2]

Variable jormungandr.autodiff.Variable.__imul__ (   self,
float  rhs 
)
Variable-Variable compound multiplication operator.

Parameter ``rhs``:
    Operator right-hand side.

◆ __imul__() [2/2]

Variable jormungandr.autodiff.Variable.__imul__ (   self,
Variable  rhs 
)

◆ __isub__() [1/2]

Variable jormungandr.autodiff.Variable.__isub__ (   self,
float  rhs 
)
Variable-Variable compound subtraction operator.

Parameter ``rhs``:
    Operator right-hand side.

◆ __isub__() [2/2]

Variable jormungandr.autodiff.Variable.__isub__ (   self,
Variable  rhs 
)

◆ __itruediv__() [1/2]

Variable jormungandr.autodiff.Variable.__itruediv__ (   self,
float  rhs 
)
Variable-Variable compound division operator.

Parameter ``rhs``:
    Operator right-hand side.

◆ __itruediv__() [2/2]

Variable jormungandr.autodiff.Variable.__itruediv__ (   self,
Variable  rhs 
)

◆ __le__() [1/3]

InequalityConstraints jormungandr.autodiff.Variable.__le__ (   self,
float  lhs 
)
Greater-than-or-equal-to comparison operator that returns an
inequality constraint for two Variables.

Parameter ``lhs``:
    Left-hand side.

Parameter ``rhs``:
    Left-hand side.

◆ __le__() [2/3]

InequalityConstraints jormungandr.autodiff.Variable.__le__ (   self,
float  rhs 
)
Less-than-or-equal-to comparison operator that returns an inequality
constraint for two Variables.

Parameter ``lhs``:
    Left-hand side.

Parameter ``rhs``:
    Left-hand side.

◆ __le__() [3/3]

InequalityConstraints jormungandr.autodiff.Variable.__le__ (   self,
Variable  rhs 
)
Less-than-or-equal-to comparison operator that returns an inequality
constraint for two Variables.

Parameter ``lhs``:
    Left-hand side.

Parameter ``rhs``:
    Left-hand side.

◆ __lt__() [1/3]

InequalityConstraints jormungandr.autodiff.Variable.__lt__ (   self,
float  lhs 
)
Greater-than comparison operator that returns an inequality constraint
for two Variables.

Parameter ``lhs``:
    Left-hand side.

Parameter ``rhs``:
    Left-hand side.

◆ __lt__() [2/3]

InequalityConstraints jormungandr.autodiff.Variable.__lt__ (   self,
float  rhs 
)
Less-than comparison operator that returns an inequality constraint
for two Variables.

Parameter ``lhs``:
    Left-hand side.

Parameter ``rhs``:
    Left-hand side.

◆ __lt__() [3/3]

InequalityConstraints jormungandr.autodiff.Variable.__lt__ (   self,
Variable  rhs 
)
Less-than comparison operator that returns an inequality constraint
for two Variables.

Parameter ``lhs``:
    Left-hand side.

Parameter ``rhs``:
    Left-hand side.

◆ __mul__() [1/2]

Variable jormungandr.autodiff.Variable.__mul__ (   self,
float  rhs 
)

◆ __mul__() [2/2]

Variable jormungandr.autodiff.Variable.__mul__ (   self,
Variable  rhs 
)

◆ __neg__()

Variable jormungandr.autodiff.Variable.__neg__ (   self)

◆ __pos__()

Variable jormungandr.autodiff.Variable.__pos__ (   self)

◆ __pow__()

Variable jormungandr.autodiff.Variable.__pow__ (   self,
int  power 
)

◆ __radd__()

Variable jormungandr.autodiff.Variable.__radd__ (   self,
float  lhs 
)

◆ __rmul__()

Variable jormungandr.autodiff.Variable.__rmul__ (   self,
float  lhs 
)

◆ __rsub__()

Variable jormungandr.autodiff.Variable.__rsub__ (   self,
float  lhs 
)

◆ __rtruediv__()

Variable jormungandr.autodiff.Variable.__rtruediv__ (   self,
float  lhs 
)

◆ __sub__() [1/2]

Variable jormungandr.autodiff.Variable.__sub__ (   self,
float  rhs 
)

◆ __sub__() [2/2]

Variable jormungandr.autodiff.Variable.__sub__ (   self,
Variable  rhs 
)

◆ __truediv__() [1/2]

Variable jormungandr.autodiff.Variable.__truediv__ (   self,
float  rhs 
)

◆ __truediv__() [2/2]

Variable jormungandr.autodiff.Variable.__truediv__ (   self,
Variable  rhs 
)

◆ set_value() [1/2]

None jormungandr.autodiff.Variable.set_value (   self,
float  value 
)
Sets Variable's internal value.

Parameter ``value``:
    The value of the Variable.

◆ set_value() [2/2]

None jormungandr.autodiff.Variable.set_value (   self,
float  value 
)

◆ type()

ExpressionType jormungandr.autodiff.Variable.type (   self)
Returns the type of this expression (constant, linear, quadratic, or
nonlinear).

◆ value()

float jormungandr.autodiff.Variable.value (   self)
Returns the value of this variable.

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