LPWrapper#
- class pyopenms.LPWrapper#
Bases:
objectCython implementation of _LPWrapper
Documentation is available at http://www.openms.de/current_doxygen/html/classOpenMS_1_1LPWrapper.html
- __init__()#
Cython signature: void LPWrapper()
Methods
Cython signature: void LPWrapper()
Cython signature: int addColumn()
Cython signature: int addRow(libcpp_vector[int] row_indices, libcpp_vector[double] row_values, const String & name)
Cython signature: void deleteRow(int index) Delete index-th row
Cython signature: int getColumnIndex(const String & name) Returns index of the column with name
Cython signature: double getColumnLowerBound(int index) Returns column's lower bound
Cython signature: String getColumnName(int index) Returns name of the index-th column
Cython signature: VariableType getColumnType(int index) Returns column/variable type.
Cython signature: double getColumnUpperBound(int index) Returns column's upper bound
Cython signature: double getColumnValue(int index)
Cython signature: double getElement(int row_index, int column_index) Returns the element
Cython signature: void getMatrixRow(int idx, libcpp_vector[int] & indexes)
Cython signature: int getNumberOfColumns() Returns number of columns
Cython signature: int getNumberOfNonZeroEntriesInRow(int idx)
Cython signature: int getNumberOfRows() Returns number of rows
Cython signature: double getObjective(int index) Returns objective value for column with index
Cython signature: Sense getObjectiveSense() Returns objective sense
Cython signature: double getObjectiveValue()
Cython signature: int getRowIndex(const String & name) Returns index of the row with name
Cython signature: double getRowLowerBound(int index) Returns row's lower bound
Cython signature: String getRowName(int index) Sets name of the index-th row
Cython signature: double getRowUpperBound(int index) Returns row's upper bound
Cython signature: SOLVER getSolver() Returns currently active solver
Cython signature: SolverStatus getStatus()
Cython signature: void readProblem(String filename, String format_)
Cython signature: void setColumnBounds(int index, double lower_bound, double upper_bound, LPWrapper_Type type_) Sets column bounds
Cython signature: void setColumnName(int index, const String & name) Sets name of the index-th column
Cython signature: void setColumnType(int index, VariableType type_) Sets column/variable type.
Cython signature: void setElement(int row_index, int column_index, double value) Sets the element
Cython signature: void setObjective(int index, double obj_value) Sets objective value for column with index
Cython signature: void setObjectiveSense(Sense sense) Sets objective direction
Cython signature: void setRowBounds(int index, double lower_bound, double upper_bound, LPWrapper_Type type_) Sets row bounds
Cython signature: void setRowName(int index, const String & name) Sets name of the index-th row
Cython signature: int solve(SolverParam & solver_param, size_t verbose_level)
Cython signature: void writeProblem(const String & filename, WriteFormat format_)
- LPWrapper_Type#
alias of
pyopenms.pyopenms_8.__LPWrapper_Type
- SOLVER#
alias of
pyopenms.pyopenms_8.__SOLVER
- Sense#
alias of
pyopenms.pyopenms_8.__Sense
- SolverStatus#
alias of
pyopenms.pyopenms_8.__SolverStatus
- VariableType#
alias of
pyopenms.pyopenms_8.__VariableType
- WriteFormat#
alias of
pyopenms.pyopenms_8.__WriteFormat
- addColumn()#
Cython signature: int addColumn() Adds an empty column to the LP matrix, returns index
Cython signature: int addColumn(libcpp_vector[int] column_indices, libcpp_vector[double] column_values, const String & name) Adds a column to the LP matrix, returns index
Cython signature: int addColumn(libcpp_vector[int] & column_indices, libcpp_vector[double] & column_values, const String & name, double lower_bound, double upper_bound, LPWrapper_Type type_) Adds a column with boundaries to the LP matrix, returns index
- addRow()#
Cython signature: int addRow(libcpp_vector[int] row_indices, libcpp_vector[double] row_values, const String & name) Adds a row to the LP matrix, returns index
Cython signature: int addRow(libcpp_vector[int] & row_indices, libcpp_vector[double] & row_values, const String & name, double lower_bound, double upper_bound, LPWrapper_Type type_) Adds a row with boundaries to the LP matrix, returns index
- deleteRow()#
Cython signature: void deleteRow(int index) Delete index-th row
- getColumnIndex()#
Cython signature: int getColumnIndex(const String & name) Returns index of the column with name
- getColumnLowerBound()#
Cython signature: double getColumnLowerBound(int index) Returns column’s lower bound
- getColumnName()#
Cython signature: String getColumnName(int index) Returns name of the index-th column
- getColumnType()#
Cython signature: VariableType getColumnType(int index) Returns column/variable type.
- getColumnUpperBound()#
Cython signature: double getColumnUpperBound(int index) Returns column’s upper bound
- getColumnValue()#
Cython signature: double getColumnValue(int index)
- getElement()#
Cython signature: double getElement(int row_index, int column_index) Returns the element
- getMatrixRow()#
Cython signature: void getMatrixRow(int idx, libcpp_vector[int] & indexes)
- getNumberOfColumns()#
Cython signature: int getNumberOfColumns() Returns number of columns
- getNumberOfNonZeroEntriesInRow()#
Cython signature: int getNumberOfNonZeroEntriesInRow(int idx)
- getNumberOfRows()#
Cython signature: int getNumberOfRows() Returns number of rows
- getObjective()#
Cython signature: double getObjective(int index) Returns objective value for column with index
- getObjectiveSense()#
Cython signature: Sense getObjectiveSense() Returns objective sense
- getObjectiveValue()#
Cython signature: double getObjectiveValue()
- getRowIndex()#
Cython signature: int getRowIndex(const String & name) Returns index of the row with name
- getRowLowerBound()#
Cython signature: double getRowLowerBound(int index) Returns row’s lower bound
- getRowName()#
Cython signature: String getRowName(int index) Sets name of the index-th row
- getRowUpperBound()#
Cython signature: double getRowUpperBound(int index) Returns row’s upper bound
- getSolver()#
Cython signature: SOLVER getSolver() Returns currently active solver
- getStatus()#
Cython signature: SolverStatus getStatus()
- Returns
status: 1 - undefined, 2 - integer optimal, 3- integer feasible (no optimality proven), 4- no integer feasible solution
- readProblem()#
Cython signature: void readProblem(String filename, String format_)
- Parameters
filename – Filename where to store the LP problem
format – LP, MPS or GLPK
- setColumnBounds()#
Cython signature: void setColumnBounds(int index, double lower_bound, double upper_bound, LPWrapper_Type type_) Sets column bounds
- setColumnName()#
Cython signature: void setColumnName(int index, const String & name) Sets name of the index-th column
- setColumnType()#
Cython signature: void setColumnType(int index, VariableType type_) Sets column/variable type.
- setElement()#
Cython signature: void setElement(int row_index, int column_index, double value) Sets the element
- setObjective()#
Cython signature: void setObjective(int index, double obj_value) Sets objective value for column with index
- setObjectiveSense()#
Cython signature: void setObjectiveSense(Sense sense) Sets objective direction
- setRowBounds()#
Cython signature: void setRowBounds(int index, double lower_bound, double upper_bound, LPWrapper_Type type_) Sets row bounds
- setRowName()#
Cython signature: void setRowName(int index, const String & name) Sets name of the index-th row
- solve()#
Cython signature: int solve(SolverParam & solver_param, size_t verbose_level)
- Parameters
solver_param – Parameters of the solver introduced by SolverParam
verbose_level – Sets verbose level
- Returns
solver dependent