Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
lambda_matrix< graph > Class Template Reference

#include <lambda_matrix.h>

Public Member Functions

 lambda_matrix (graph &g1)
 
float get_node_col (int col1, int col2, int row2)
 
float get_node_row (int row1, int col2, int row2)
 
void clear_lambda ()
 
void prohibit (graph &g, vector< int > &lo, vector< int > &up)
 
void allow (vector< int > &lo, vector< int > &up)
 
void add_node_col (int col1, int col2, int row2, float step)
 
void add_node_row (int row1, int col2, int row2, float step)
 
void sub_node_col (int col1, int col2, int row2, float step)
 
void sub_node_row (int row1, int col2, int row2, float step)
 
vector< vector< float > > & get_lnc ()
 

Protected Attributes

graph & g
 
vector< vector< float > > lambda_node_col
 
vector< vector< float > > lambda_node_row
 
vector< float > coef_lambda_node
 
vector< vector< float > > coef_lambda_edge
 
vector< vector< int > > nz_sgv_c
 
int nz_c
 
vector< vector< int > > nz_sgv_r
 
int nz_r
 
vector< vector< bool > > lambda_modified_nodes
 

Detailed Description

template<class graph>
class lambda_matrix< graph >

Lambda_Mat_Apurva Class. Contain the lambda coeficients of the lagrangian relaxation of the A_purva model.

Constructor & Destructor Documentation

◆ lambda_matrix()

lambda_matrix ( graph &  g1)
inline

Constructors

Member Function Documentation

◆ add_node_col()

void add_node_col ( int  col1,
int  col2,
int  row2,
float  step 
)
inline

update lambda coeficients for constraint col1 / node N_{col2,row2}. add step value to lambda coeficient. This function also update the lambda modified coeficients for node and edges.

◆ add_node_row()

void add_node_row ( int  row1,
int  col2,
int  row2,
float  step 
)
inline

update lambda coeficients for constraint row1 / node N_{col2,row2}. add step value to lambda coeficient. This function also update the lambda modified coeficients for node and edges.

◆ allow()

void allow ( vector< int > &  lo,
vector< int > &  up 
)
inline

Allow edges forbidden by function prohibit, by removing penalty

◆ clear_lambda()

void clear_lambda ( )
inline

Modificators

◆ get_lnc()

vector<vector<float> >& get_lnc ( )
inline

This should be forbidden !!!! But it allows much faster computation ^^;

◆ get_node_col()

float get_node_col ( int  col1,
int  col2,
int  row2 
)
inline

Accessors Return the lambda coeficients for the relaxed constraint between column col1 and node N_{col2,row2}.

◆ get_node_row()

float get_node_row ( int  row1,
int  col2,
int  row2 
)
inline

Return the lambda coeficients for the relaxed constraint between row row1 and node N_{col2,row2}.

◆ prohibit()

void prohibit ( graph &  g,
vector< int > &  lo,
vector< int > &  up 
)
inline

Prohibit edges going out of lower and upper limits, by giving them very large penalty

◆ sub_node_col()

void sub_node_col ( int  col1,
int  col2,
int  row2,
float  step 
)
inline

Same as add_node_col, but for substracting the step value. It modified the step value to avoid negative lambda (lambda are in R+)

◆ sub_node_row()

void sub_node_row ( int  row1,
int  col2,
int  row2,
float  step 
)
inline

Same as add_node_row, but for substracting the step value. It modified the step value to avoid negative lambda (lambda are in R+)

Member Data Documentation

◆ coef_lambda_edge

vector<vector<float> > coef_lambda_edge
protected

Lambda modified coeficients for edges

◆ coef_lambda_node

vector<float> coef_lambda_node
protected

Lambda modified coeficients for nodes

◆ g

graph& g
protected

The Contact Map Alignment graph

◆ lambda_modified_nodes

vector<vector<bool> > lambda_modified_nodes
protected

Table recording which nodes were modified during last sgd iteration, in order not to recompute the weight of all nodes...

◆ lambda_node_col

vector<vector<float> > lambda_node_col
protected

Lambda coeficients for relaxed column/node constraints

◆ lambda_node_row

vector<vector<float> > lambda_node_row
protected

Lambda coeficients for relaxed row/node constraints

◆ nz_c

int nz_c
protected

Number of non-zero components of the subgradient vector for lambda column/node

◆ nz_r

int nz_r
protected

Number of non-zero components of the subgradient vector for lambda row/node

◆ nz_sgv_c

vector<vector<int> > nz_sgv_c
protected

Non-Zero components of the subgradient vector for lambda column/node

◆ nz_sgv_r

vector<vector<int> > nz_sgv_r
protected

Non-Zero components of the subgradient vector for lambda row/node