Public Member Functions | Public Attributes | List of all members
factor.FactorGraph Class Reference
Inheritance diagram for factor.FactorGraph:
Inheritance graph
[legend]

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 37 of file factor.py.

Constructor & Destructor Documentation

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 44 of file factor.py.

Member Function Documentation

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 74 of file factor.py.

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 83 of file factor.py.

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 57 of file factor.py.

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

Definition at line 92 of file factor.py.

Member Data Documentation

factor.FactorGraph.A

Definition at line 52 of file factor.py.

factor.FactorGraph.b

Definition at line 53 of file factor.py.

factor.FactorGraph.C

Definition at line 54 of file factor.py.

factor.FactorGraph.d

Definition at line 55 of file factor.py.

factor.FactorGraph.N

Definition at line 51 of file factor.py.

factor.FactorGraph.nx

Definition at line 50 of file factor.py.


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


pinocchio
Author(s):
autogenerated on Tue Jun 1 2021 02:45:05