Skip to content

Commit

Permalink
might fix solaris errors
Browse files Browse the repository at this point in the history
  • Loading branch information
adalisan committed Aug 5, 2017
1 parent fac36a9 commit d1b2f58
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/graphm/algorithm_path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ match_result algorithm_path::match(graph& g, graph& h,gsl_matrix* gm_P_i, gsl_ma
gm_P_bp_temp=gsl_matrix_alloc(N, N);
gm_P_bp=gsl_matrix_alloc(N, N);
};
int Nqua = pow(N, 4);
//*************ALGORITHM***********************
bool bpath_continue=true;
double dlambda_add=dlambda_min;
Expand Down Expand Up @@ -261,7 +262,8 @@ match_result algorithm_path::match(graph& g, graph& h,gsl_matrix* gm_P_i, gsl_ma
// int dbg=1;
ddP_norm=gsl_matrix_norm(gm_P_prev, 1);
bstop_algo=((ddP_norm<dfw_xeps*N*dlambda_M_c) and ((abs(df_value-df_value_old)<dfw_feps*abs(df_value_old)*dlambda_M_c) or (ddP_norm==0)));
bstop_algo = (bstop_algo or (icounter>pow(N, 4)));

bstop_algo = (bstop_algo or (icounter>Nqua));
bstop_algo=(bstop_algo or (abs(df_value-df_value_old)<1e-30));
bstop_algo=(bstop_algo or ((icounter>0) and binc_lambda));//if we are on the increment step do not repreat many times
icounter++;
Expand Down
3 changes: 2 additions & 1 deletion src/graphm/graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
#include <gsl/gsl_eigen.h>
#include "hungarian.h"
#include <stdexcept>

//using namespace std;

graph::graph(const gsl_matrix *_gm_A) : rpc("")
{
gm_A = NULL;
N = 0;
set_adjmatrix(_gm_A);

}

graph::graph(std::string fconfig)
Expand Down
2 changes: 1 addition & 1 deletion src/graphm/hungarian.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ void gsl_matrix_hungarian(gsl_matrix* gm_C,gsl_matrix* gm_P,gsl_vector* gv_col_i
for (long l=0;l<n1*n2;l++)
{
ind=C_ind[l];
ind1=floor(ind/n1);
ind1=floor(((int)ind)/n1);
ind2=ind%n2;

if (!bperm_fix_1[ind1] and !bperm_fix_2[ind2])
Expand Down

0 comments on commit d1b2f58

Please sign in to comment.