Skip to content

Commit

Permalink
some more error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
adalisan committed Aug 29, 2017
1 parent 9d96c67 commit c53101b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/graphm/experiment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ void experiment::run_experiment(graph &g, graph &h)
int N2 =0;
N2 = h.get_adjmatrix()->size1;
// Matrix of local similarities between graph vertices
if ( N1==0)
throw std::runtime_error("Error: graph g has adjacency matrix of 0 size \n");
if ( N2==0)
throw std::runtime_error("Error: graph h has adjacency matrix of 0 size \n");

gsl_matrix* gm_ldh=gsl_matrix_alloc(N1,N2);


Expand Down
1 change: 1 addition & 0 deletions src/graphmatch_rcpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ Rcpp::List run_graph_match(const RcppGSL::Matrix& A, const RcppGSL::Matrix& B, c
try {

exp.run_experiment(graphm_obj_A, graphm_obj_B);
Rcpp::Rcout <<"GM Experiments complete\n";

int exp_count = exp.get_algo_len();

Expand Down

0 comments on commit c53101b

Please sign in to comment.