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 T cu, const T cv) |
bool | check_flow () |
void | component_gap (const list_int &component) |
void | component_relabelling (const list_int &component, const int max_label, const bool force) |
T | compute_thrs_project_l1 (T *X, const int n, const T lambda) |
void | deactivate () |
void | deactivate (const list_int &component) |
void | discharge (const list_int &component, const int u, const int max_label) |
void | extractConnexComponents (std::list< list_int * > &connex_components) |
T | flow_component (const list_int &component, const int Ng) |
void | gap_relabelling (const list_int &component, const int gap, const int max_label) |
T | getMaxFlow () const |
void | global_relabelling () |
void | init_split_variables (SpMatrix< T > &splitted_w, const int Ng, const int Nv) |
void | init_split_variables_aux (const int node, int ¤t_counter, Vector< int > &counter_node, list_int **splitted_w, const int Ng, const int Nv) |
MaxFlow (const int N, const int *num_edges, const int s, const int t) | |
T | norm (const T *variables, T *work, const T *weights, const int Ng, const bool linf=true) |
int | nzmax () const |
void | perform_maxflow () |
void | perform_maxflow_component (const list_int &component) |
void | print_component (const list_int &component) |
void | print_component2 (const list_int &component) |
void | print_excess () |
void | print_graph () |
void | print_graph_aux (const int node) |
void | print_labels () |
void | print_sink () |
T | project (const list_int &component, const T *variables_in, T *variables_out, T *work, const int Ng) |
T | project_box (const list_int &component, const T *variables_in, T *variables_out, T *work, bool &fusion, const int Ng) |
T | project_weighted (const list_int &component, const T *variables_in, T *variables_out, T *work, const T *weights, const int Ng) |
void | reset_component (const list_int &component) |
void | reset_flow () |
void | restore_capacities (const list_int &component) |
void | restore_capacities () |
void | restore_flow () |
void | save_capacities () |
void | save_flow () |
void | scale_flow (const T scal) |
void | set_capacities_groups (const list_int &component, const Vector< T > &weights, const T lambda, const int Ng) |
void | set_capacities_variables (const T *cap, const int Nv, const int Ng) |
void | set_weights (const T lambda) |
void | set_weights (const T *weights, const T lambda) |
bool | splitComponent (const list_int &component, std::list< list_int * > &connex_components, const int Ng, bool *positive, const bool addpos=true) |
void | sub_gradient (const Vector< T > &input, Vector< T > &output, const Vector< T > &weights, const int Ng) |
void | sub_gradient_aux (const Vector< T > &input, Vector< T > &output, const Vector< T > &weights, const int node, list_int &list, const int Ng) |
void | update_capacities (const list_int &component, T *work) |
void | update_capacities_aux (const int node, T *work) |
~MaxFlow () | |
Private Attributes | |
bool * | _active |
list_int ** | _active_nodes |
int * | _all_nodes |
T * | _capacity |
int * | _children |
T * | _copycapacity |
T * | _copyexcess |
T * | _copyflow |
int * | _current_edges |
int | _current_max_label |
T * | _excess |
T * | _flow |
int * | _labels |
int * | _max_num_edges |
int | _N |
int * | _num_edges |
int | _nzmax |
int * | _pr_node |
int * | _reverse_address |
int | _s |
bool * | _seen |
int | _t |
spams::MaxFlow< T >::MaxFlow | ( | const int | N, |
const int * | num_edges, | ||
const int | s, | ||
const int | t | ||
) |
spams::MaxFlow< T >::~MaxFlow | ( | ) |
|
inline |
Definition at line 620 of file project.h.
Referenced by spams::Graph< T >::create_graph().
|
inline |
Definition at line 835 of file project.h.
References spams::abs(), spams::List< T >::empty(), EPSILON_MAXFLOW, spams::List< T >::front(), spams::List< T >::pop_front(), and spams::List< T >::push_back().
|
inline |
|
inline |
relabel component, with warm restart
discharge source
Definition at line 1657 of file project.h.
References spams::List< T >::begin(), spams::List< T >::empty(), spams::List< T >::end(), EPSILON_MAXFLOW, spams::List< T >::front(), spams::Timer::getElapsed(), spams::List< T >::pop_front(), spams::List< T >::push_back(), spams::List< T >::size(), spams::Timer::start(), and spams::Timer::stop().
|
inline |
|
inline |
|
inline |
Definition at line 751 of file project.h.
References spams::List< T >::begin(), and spams::List< T >::end().
|
inline |
add v to the list of active nodes
relabel:
Definition at line 638 of file project.h.
References EPSILON_MAXFLOW, and MIN.
|
inline |
extract all the connex components for the initialization
Definition at line 1185 of file project.h.
References spams::List< T >::empty(), spams::List< T >::front(), spams::List< T >::pop_front(), and spams::List< T >::push_back().
|
inline |
do relabelling and update list of active nodes
return the amount of flow
Definition at line 1417 of file project.h.
References spams::List< T >::begin(), and spams::List< T >::end().
|
inline |
Definition at line 1638 of file project.h.
References spams::List< T >::begin(), spams::List< T >::end(), spams::Timer::getElapsed(), spams::Timer::start(), and spams::Timer::stop().
|
inline |
|
inline |
Definition at line 1152 of file project.h.
References spams::List< T >::empty(), EPSILON_MAXFLOW, spams::List< T >::front(), spams::List< T >::pop_front(), and spams::List< T >::push_back().
|
inline |
assumes memory is not an issue
Definition at line 780 of file project.h.
References spams::List< T >::end(), spams::SpMatrix< T >::pB(), spams::SpMatrix< T >::r(), spams::SpMatrix< T >::resize(), spams::List< T >::size(), and spams::SpMatrix< T >::v().
|
inline |
rempli colonne current de splitted_w avec les enfants + propres variables
Definition at line 1114 of file project.h.
References spams::List< T >::end(), spams::Vector< T >::n(), spams::List< T >::push_back(), and spams::Vector< T >::setZeros().
|
inline |
Definition at line 997 of file project.h.
References spams::abs(), spams::List< T >::empty(), spams::List< T >::front(), MAX, spams::List< T >::pop_front(), spams::List< T >::push_back(), and spams::List< T >::push_front().
|
inline |
|
inline |
Definition at line 704 of file project.h.
References EPSILON_MAXFLOW.
|
inline |
discharge the source and relabel
perform max flow
Definition at line 1579 of file project.h.
References EPSILON_MAXFLOW, PRINT_I, spams::List< T >::size(), spams::Timer::start(), spams::stop(), and spams::Timer::stop().
|
inline |
Definition at line 918 of file project.h.
References spams::List< T >::begin(), and spams::List< T >::end().
|
inline |
Definition at line 1054 of file project.h.
References spams::List< T >::begin(), and spams::List< T >::end().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
project on the component, project, update the capacity, update the preflow, update variables_out, update labels return the maximum value of the potential flow
Definition at line 1260 of file project.h.
References spams::List< T >::begin(), spams::List< T >::end(), and MIN.
|
inline |
Definition at line 1301 of file project.h.
References spams::List< T >::begin(), spams::List< T >::empty(), spams::List< T >::end(), spams::List< T >::front(), INFINITY, MAX, MIN, spams::List< T >::pop_front(), spams::List< T >::push_back(), and spams::List< T >::push_front().
|
inline |
Definition at line 1217 of file project.h.
References spams::List< T >::begin(), spams::List< T >::end(), spams::Vector< T >::l1project_weighted(), spams::Vector< T >::setn(), and spams::List< T >::size().
|
inline |
Definition at line 1566 of file project.h.
References spams::List< T >::begin(), and spams::List< T >::end().
|
inline |
|
inline |
relabel component, with warm restart
Definition at line 1817 of file project.h.
References spams::List< T >::begin(), spams::List< T >::end(), and INFINITY.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 1805 of file project.h.
References spams::List< T >::begin(), and spams::List< T >::end().
|
inline |
Definition at line 1796 of file project.h.
References spams::abs().
|
inline |
|
inline |
|
inline |
cut the component into connex components, and add them to connex_components
make the "positive part of the graph"
start new component, track from where the excess can come
update from the source
extract the connex components of the positive part
start new component, track from where the excess can come
extract the connex components of the negative part
start new component, track from where the excess can come
Definition at line 1437 of file project.h.
References spams::List< T >::begin(), spams::List< T >::empty(), spams::List< T >::end(), EPSILON_MAXFLOW, spams::List< T >::front(), spams::List< T >::pop_front(), and spams::List< T >::push_back().
|
inline |
Definition at line 979 of file project.h.
References spams::List< T >::empty(), spams::List< T >::front(), spams::List< T >::pop_front(), spams::List< T >::push_back(), and spams::Vector< T >::setZeros().
|
inline |
Definition at line 941 of file project.h.
References spams::List< T >::begin(), spams::List< T >::end(), spams::List< T >::fusion(), spams::List< T >::push_back(), and spams::List< T >::size().
|
inline |
Definition at line 1742 of file project.h.
References spams::List< T >::begin(), spams::List< T >::empty(), spams::List< T >::end(), spams::List< T >::front(), MAX, spams::List< T >::pop_front(), spams::List< T >::push_back(), and spams::List< T >::push_front().
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |