Public Member Functions | Public Attributes | List of all members
factor.FactorGraph Class Reference

Public Member Functions

def __init__ (self, variableSize, nbVariables)
 
def add_factor (self, factors, reference)
 
def add_factor_constraint (self, factors, reference)
 
def matrix_form_factor (self, factors)
 
def solve (self, eps=1e-8)
 

Public Attributes

 A
 
 b
 
 C
 
 d
 
 N
 
 nx
 

Detailed Description

The class FactorGraph stores a block-sparse linear-constrained quadratic program
(LCQP) of variable x=(x1...xn). The size of the problem is set up at construction of
the object.
Methods add_factor() and add_factor_constraint() are used to set up the problem.
Method solve() is used to compute the solution to the problem.

Definition at line 40 of file factor.py.

Constructor & Destructor Documentation

◆ __init__()

def factor.FactorGraph.__init__ (   self,
  variableSize,
  nbVariables 
)
Initialize a QP sparse problem as min || A x - b || so that C x = d
where  x = (x1, .., xn), and dim(xi) = variableSize and n = nbVariables
After construction, A, b, C and d are allocated and set to 0.

Definition at line 49 of file factor.py.

Member Function Documentation

◆ add_factor()

def factor.FactorGraph.add_factor (   self,
  factors,
  reference 
)
Add a factor || sum_{i} factor[i].matrix * x_{factor[i].index} - reference ||
to the cost.

Definition at line 79 of file factor.py.

◆ add_factor_constraint()

def factor.FactorGraph.add_factor_constraint (   self,
  factors,
  reference 
)
Add a factor sum_{i} factor[i].matrix * x_{factor[i].index} =  reference
to the constraints.

Definition at line 88 of file factor.py.

◆ matrix_form_factor()

def factor.FactorGraph.matrix_form_factor (   self,
  factors 
)
Internal function: not designed to be called by the user.
Create a factor matrix [ A1 0 A2 0 A3 ... ] where the Ai's are placed at
the indexes of the factors.

Definition at line 62 of file factor.py.

◆ solve()

def factor.FactorGraph.solve (   self,
  eps = 1e-8 
)
Implement a LCQP solver, with numerical threshold eps.

Definition at line 97 of file factor.py.

Member Data Documentation

◆ A

factor.FactorGraph.A

Definition at line 57 of file factor.py.

◆ b

factor.FactorGraph.b

Definition at line 58 of file factor.py.

◆ C

factor.FactorGraph.C

Definition at line 59 of file factor.py.

◆ d

factor.FactorGraph.d

Definition at line 60 of file factor.py.

◆ N

factor.FactorGraph.N

Definition at line 56 of file factor.py.

◆ nx

factor.FactorGraph.nx

Definition at line 55 of file factor.py.


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


pinocchio
Author(s):
autogenerated on Thu Dec 19 2024 03:41:35