DMRITool
v0.1.1-139-g860d86b4
Diffusion MRI Tool
|
#include <project.h>
Public Member Functions | |
void | add_edge (const int u, const int v, const Int cost, const double double_cost, const Int cap) |
void | add_flow (const int node, const int num_arc, const Int flow) |
Int | compute_cost () const |
double | compute_cost_double () const |
void | compute_min_cost (const bool scale_data=true, const bool verbose=false) |
Int | compute_uncap_cost () const |
Int | cost_shortest_path_in_dag (list_int &path) |
void | discharge (const int node, const Int eps) |
Int | get_flow (const int node, const int num_arc) const |
MinCostFlow (const int n, const int *max_num_arcs) | |
bool | price_refine (const Int eps) |
void | price_update (const Int eps) |
void | print_dimacs (const char *name) const |
void | print_excess () const |
void | print_graph () const |
void | print_prices () const |
Int | reduced_cost (const int node, const int child, const int arc) const |
Int | refine (Int eps, const bool price_refine=false) |
void | restore_costs () |
void | save_costs () |
void | scale_costs (const double scal) |
void | set_capacity (const int node, const int num_arc, const Int cap) |
void | set_demand (const int node, const Int dem) |
void | set_edge (const int node, const int num_arc, const Int cost, const Int cap) |
void | set_is_quad_cost (const bool is_quad_cost) |
void | set_quad_cost (const int node, const int num_arc, const bool quad_cost) |
void | st_flow_decomposition_dag (List< Path< Int > * > &list, const int s, const int t) const |
bool | test_optimality_conditions () const |
bool | topological_sort (const bool admissible=false, bool *admiss=NULL, Int *rcosts=NULL) |
~MinCostFlow () | |
Private Attributes | |
bool * | _active |
double | _alpha |
Int * | _capacity |
int * | _children |
Int * | _cost |
Int * | _demand |
Int * | _excess |
Int * | _flow |
double * | _init_double_cost |
bool | _is_quadratic_cost |
list_int | _list_active |
int | _m |
Int | _max_cost |
int * | _max_num_arcs |
int | _maxm |
int | _n |
int * | _num_arcs |
int * | _pr_node |
Int * | _prices |
bool * | _quad_cost |
int * | _reverse |
Int * | _save_cost |
Timer | _time1 |
Timer | _time2 |
int * | _topological_order |
bool | _topologically_sorted |
spams::MinCostFlow< Int >::MinCostFlow | ( | const int | n, |
const int * | max_num_arcs | ||
) |
spams::MinCostFlow< Int >::~MinCostFlow | ( | ) |
|
inline |
|
inline |
Int spams::MinCostFlow< Int >::compute_cost | ( | ) | const |
double spams::MinCostFlow< Int >::compute_cost_double | ( | ) | const |
void spams::MinCostFlow< Int >::compute_min_cost | ( | const bool | scale_data = true , |
const bool | verbose = false |
||
) |
Definition at line 2488 of file project.h.
References spams::Timer::printElapsed(), spams::Timer::reset(), spams::Timer::start(), and spams::Timer::stop().
Int spams::MinCostFlow< Int >::compute_uncap_cost | ( | ) | const |
Int spams::MinCostFlow< Int >::cost_shortest_path_in_dag | ( | list_int & | path | ) |
Definition at line 2894 of file project.h.
References spams::List< T >::clear(), utl::max(), and spams::List< T >::push_front().
|
inline |
Definition at line 2680 of file project.h.
References MAX, utl::max(), and MIN.
|
inline |
bool spams::MinCostFlow< Int >::price_refine | ( | const Int | eps | ) |
Definition at line 2801 of file project.h.
References spams::BinaryHeap< T >::decrease_key(), spams::BinaryHeap< T >::delete_min(), spams::BinaryHeap< T >::find_min(), spams::BinaryHeap< T >::insert(), spams::BinaryHeap< T >::is_empty(), utl::max(), spams::Timer::start(), and spams::Timer::stop().
|
inline |
Definition at line 2597 of file project.h.
References spams::BinaryHeap< T >::decrease_key(), spams::BinaryHeap< T >::delete_min(), spams::BinaryHeap< T >::find_min(), spams::BinaryHeap< T >::insert(), spams::BinaryHeap< T >::is_empty(), utl::max(), spams::Timer::start(), and spams::Timer::stop().
void spams::MinCostFlow< Int >::print_dimacs | ( | const char * | name | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
Int spams::MinCostFlow< Int >::refine | ( | Int | eps, |
const bool | price_refine = false |
||
) |
void spams::MinCostFlow< Int >::restore_costs | ( | ) |
void spams::MinCostFlow< Int >::save_costs | ( | ) |
void spams::MinCostFlow< Int >::scale_costs | ( | const double | scal | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void spams::MinCostFlow< Int >::st_flow_decomposition_dag | ( | List< Path< Int > * > & | list, |
const int | s, | ||
const int | t | ||
) | const |
Definition at line 2930 of file project.h.
References spams::List< T >::begin(), spams::BinaryHeap< T >::delete_min(), spams::List< T >::end(), spams::BinaryHeap< T >::find_min(), spams::Path< Int >::flow_int, spams::BinaryHeap< T >::insert(), spams::BinaryHeap< T >::is_empty(), MIN, spams::Path< Int >::nodes, and spams::List< T >::push_back().
bool spams::MinCostFlow< Int >::test_optimality_conditions | ( | ) | const |
|
inline |
the function assumes the graph is a DAG
Definition at line 3011 of file project.h.
References spams::List< T >::empty(), spams::List< T >::front(), spams::List< T >::pop_front(), and spams::List< T >::push_back().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |