Skip to content

Commit

Permalink
print solution error always in solve_tool
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoloval committed Mar 5, 2021
1 parent 3e819e8 commit c8c09b9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/NEMtropy/graph_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ def _initialize_problem(self, model, method):
if self.regularise == "eigenvalues":
self.hessian_regulariser = sof.matrix_regulariser_function_eigen_based
elif self.regularise == "identity":
self.hessian_regulariser = hessian_regulariser_function
self.hessian_regulariser = sof.hessian_regulariser_function

def _solve_problem_crema_undirected(
self,
Expand Down Expand Up @@ -1020,8 +1020,7 @@ def solve_tool(
eps=eps,
)
self._solution_error()
if verbose:
print("\nmin eig = {}".format(self.error))
print("\nsolution error = {}".format(self.error))

def ensemble_sampler(self, n, cpu_n=1, output_dir="sample/", seed=42):
"""The function sample a given number of graphs in the ensemble
Expand Down Expand Up @@ -2476,8 +2475,7 @@ def solve_tool(
eps=eps,
)
self._solution_error()
if verbose:
print("\nmin eig = {}".format(self.error))
print("\nsolution error = {}".format(self.error))

def ensemble_sampler(self, n, cpu_n=1, output_dir="sample/", seed=42):
"""The function sample a given number of graphs in the ensemble
Expand Down

0 comments on commit c8c09b9

Please sign in to comment.