|
OpenGM
2.3.x
Discrete Graphical Model Library
|
Provides transformations for some function types when they are used in inference algorithms which use linear programming. More...
#include <lp_functiontransfer.hxx>
Collaboration diagram for opengm::LPFunctionTransfer< VALUE_TYPE, INDEX_TYPE, LABEL_TYPE >:Classes | |
| struct | GetIndicatorVariablesFunctor |
| Functor to call LPFunctionTransfer::getIndicatorVariables() for a factor of the graphical model. More... | |
| struct | GetLinearConstraintsFunctor |
| Functor to call LPFunctionTransfer::getLinearConstraints() for a factor of the graphical model. More... | |
| struct | GetSlackVariablesObjectiveCoefficientsFunctor |
| Functor to call LPFunctionTransfer::getSlackVariablesObjectiveCoefficients() for a factor of the graphical model. More... | |
| struct | GetSlackVariablesOrderFunctor |
| Functor to call LPFunctionTransfer::getSlackVariablesOrder() for a factor of the graphical model. More... | |
| struct | IsTransferableFunctor |
| Functor to call LPFunctionTransfer::isTransferable() for a factor of the graphical model. More... | |
| struct | NumSlackVariablesFunctor |
| Functor to call LPFunctionTransfer::numSlackVariables() for a graphical model factor. More... | |
Public Types | |
| typedef VALUE_TYPE | ValueType |
| Typedef of the VALUE_TYPE template parameter type from the class LPFunctionTransfer. More... | |
| typedef INDEX_TYPE | IndexType |
| Typedef of the INDEX_TYPE template parameter type from the class LPFunctionTransfer. More... | |
| typedef LABEL_TYPE | LabelType |
| Typedef of the LABEL_TYPE template parameter type from the class LPFunctionTransfer. More... | |
| typedef LinearConstraint< ValueType, IndexType, LabelType > | LinearConstraintType |
| Typedef of the LinearConstraint class with appropriate template parameter. More... | |
| typedef std::vector< LinearConstraintType > | LinearConstraintsContainerType |
| Defines the linear constraints container type which is used to store multiple linear constraints. More... | |
| typedef LinearConstraintType::IndicatorVariableType | IndicatorVariableType |
| Defines the indicator variable type which is used within linear constraints. More... | |
| typedef std::vector< IndicatorVariableType > | IndicatorVariablesContainerType |
| Defines the indicator variables container type which is used to store multiple indicator variables. More... | |
| typedef std::vector< ValueType > | SlackVariablesObjectiveCoefficientsContainerType |
| Defines the container type which is used to store the coefficients of the slack variables for the objective function. More... | |
Static Public Member Functions | |
| template<class FUNCTION_TYPE > | |
| static bool | isTransferable () |
| This function will tell if the function type provided via the template parameter can be transfered into a more efficient LP formulation. More... | |
| template<class FUNCTION_TYPE > | |
| static IndexType | numSlackVariables (const FUNCTION_TYPE &function) |
| This function will tell the number of required slack variables for the function transfer. More... | |
| template<class FUNCTION_TYPE > | |
| static void | getSlackVariablesOrder (const FUNCTION_TYPE &function, IndicatorVariablesContainerType &order) |
| This function will tell the order of the slack variables which are required for the function transfer. More... | |
| template<class FUNCTION_TYPE > | |
| static void | getSlackVariablesObjectiveCoefficients (const FUNCTION_TYPE &function, SlackVariablesObjectiveCoefficientsContainerType &coefficients) |
| This function will tell the coefficients of the slack variables for the objective function of the linear program. More... | |
| template<class FUNCTION_TYPE > | |
| static void | getIndicatorVariables (const FUNCTION_TYPE &function, IndicatorVariablesContainerType &variables) |
| This function will tell all the indicator variables which are used in the linear constraints which are used for the function transfer. More... | |
| template<class FUNCTION_TYPE > | |
| static void | getLinearConstraints (const FUNCTION_TYPE &function, LinearConstraintsContainerType &constraints) |
| This function will create the necessary linear constraints which are used to represent the function within the LP. More... | |
Provides transformations for some function types when they are used in inference algorithms which use linear programming.
In inference algorithms like opengm::LPCplex which rely on opengm::LPBase the inference task is reformulated as a linear program. Therefore all factors which are not linear constraint factors are added the same way to the LP no matter what function type is used for these factors. However some function types like opengm::LabelCostFunction can be added in a more efficient formulation to the LP. This class provides an interface to transform the function behind a factor so opengm::LPBase can benefit from the more efficient representation of the factor.
| VALUE_TYPE | Value type. |
| INDEX_TYPE | Index type. |
| LABEL_TYPE | Label type. |
Definition at line 15 of file lp_functiontransfer.hxx.
| opengm::LPFunctionTransfer< VALUE_TYPE, INDEX_TYPE, LABEL_TYPE >::IndexType |
Typedef of the INDEX_TYPE template parameter type from the class LPFunctionTransfer.
Definition at line 19 of file lp_functiontransfer.hxx.
| opengm::LPFunctionTransfer< VALUE_TYPE, INDEX_TYPE, LABEL_TYPE >::IndicatorVariablesContainerType |
Defines the indicator variables container type which is used to store multiple indicator variables.
Definition at line 24 of file lp_functiontransfer.hxx.
| opengm::LPFunctionTransfer< VALUE_TYPE, INDEX_TYPE, LABEL_TYPE >::IndicatorVariableType |
Defines the indicator variable type which is used within linear constraints.
Definition at line 23 of file lp_functiontransfer.hxx.
| opengm::LPFunctionTransfer< VALUE_TYPE, INDEX_TYPE, LABEL_TYPE >::LabelType |
Typedef of the LABEL_TYPE template parameter type from the class LPFunctionTransfer.
Definition at line 20 of file lp_functiontransfer.hxx.
| opengm::LPFunctionTransfer< VALUE_TYPE, INDEX_TYPE, LABEL_TYPE >::LinearConstraintsContainerType |
Defines the linear constraints container type which is used to store multiple linear constraints.
Definition at line 22 of file lp_functiontransfer.hxx.
| opengm::LPFunctionTransfer< VALUE_TYPE, INDEX_TYPE, LABEL_TYPE >::LinearConstraintType |
Typedef of the LinearConstraint class with appropriate template parameter.
Definition at line 21 of file lp_functiontransfer.hxx.
| opengm::LPFunctionTransfer< VALUE_TYPE, INDEX_TYPE, LABEL_TYPE >::SlackVariablesObjectiveCoefficientsContainerType |
Defines the container type which is used to store the coefficients of the slack variables for the objective function.
Definition at line 25 of file lp_functiontransfer.hxx.
| opengm::LPFunctionTransfer< VALUE_TYPE, INDEX_TYPE, LABEL_TYPE >::ValueType |
Typedef of the VALUE_TYPE template parameter type from the class LPFunctionTransfer.
Definition at line 18 of file lp_functiontransfer.hxx.
|
inlinestatic |
This function will tell all the indicator variables which are used in the linear constraints which are used for the function transfer.
| FUNCTION_TYPE | The type of the function. |
| [in] | function | The function which will be transfered to the LP. |
| [out] | variables | This container will be filled with the indicator variables which are used in the linear constraints. |
Definition at line 614 of file lp_functiontransfer.hxx.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
This function will create the necessary linear constraints which are used to represent the function within the LP.
| FUNCTION_TYPE | The type of the function. |
| [in] | function | The function which will be transfered to the LP. |
| [out] | constraints | This container will be filled with the linear constraints which are required to add the function to the LP. Slack variables which are required for the transfer will be represented by opengm::IndicatorVariables consisting of exactly one variable-label-pair where the variable id is set to a value greater or equal to the number of variables of the function and the label is set to 0. |
Definition at line 620 of file lp_functiontransfer.hxx.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
This function will tell the coefficients of the slack variables for the objective function of the linear program.
| FUNCTION_TYPE | The type of the function. |
| [in] | function | The function which will be transfered to the LP. |
| [out] | coefficients | This container will be filled with the coefficients of the slack variables for the objective function of the linear program. |
Definition at line 608 of file lp_functiontransfer.hxx.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
This function will tell the order of the slack variables which are required for the function transfer.
| FUNCTION_TYPE | The type of the function. |
| [in] | function | The function which will be transfered to the LP. |
| [out] | order | This container will be filled with the indicator variables representing the slack variables. |
Definition at line 602 of file lp_functiontransfer.hxx.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
This function will tell if the function type provided via the template parameter can be transfered into a more efficient LP formulation.
| FUNCTION_TYPE | The type of the function. |
Definition at line 590 of file lp_functiontransfer.hxx.
Here is the call graph for this function:
|
inlinestatic |
This function will tell the number of required slack variables for the function transfer.
| FUNCTION_TYPE | The type of the function. |
| [in] | function | The function which will be transfered to the LP. |
Definition at line 596 of file lp_functiontransfer.hxx.
Here is the call graph for this function:
Here is the caller graph for this function:
1.8.9.1