cspy
stable

User Guide

  • Getting started
  • Using cspy
  • Resource Extension Functions (REFs)

Python API

  • cspy.BiDirectional
  • cspy.Tabu
  • cspy.GreedyElim
  • cspy.GRASP
  • cspy.PSOLGENT
  • cspy.preprocess_graph
  • cspy.check

C++ API

  • BiDirectional
  • Search
  • REFCallback
  • Params
  • DiGraph
  • Vertex
  • Labelling
  • Preprocessing
cspy
  • Docs »
  • Search
  • Edit on GitHub

Search¶

class Search¶

Public Functions

void makeHeap()¶

Initialises heap using the appropriate comparison i.e. increasing in the monotone resource forward lists, decreasing otherwise

void pushHeap()¶

Push new elements in heap using the appropriate comparison i.e. increasing in the monotone resource forward lists, decreasing otherwise

inline void replaceBestLabel(const int &lemon_id, const labelling::Label &label)¶

Replace best label.

inline void replaceCurrentLabel(const labelling::Label &label)¶

Replace best label.

inline void replaceIntermediateLabel(const labelling::Label &label)¶

Replace intermediate label.

inline void addVisitedVertex(const int &lemon_id)¶

Update vertices visited.

Public Members

Directions direction¶

Direction of Search.

bool stop = false¶

Stopping criteria for each direction.

bool bound_exceeded = false¶

Stopping criteria for each direction.

int unprocessed_count = 0¶

Number of unprocessed labels generated.

int processed_count = 0¶

Number of labels processed.

int generated_count = 0¶

Number of labels generated (includes the possibly infeasible extensions)

std::unique_ptr<std::vector<double>> lower_bound_weight¶

Lower bounds from any node to sink.

std::set<int> visited_vertices¶

vector with indices of vertices visited

std::shared_ptr<labelling::Label> intermediate_label¶

Intermediate current best label with possibly complete source-sink path (shared pointer as we want to be able to substitute it without resetting)

std::vector<std::vector<labelling::Label>> efficient_labels¶

vector with pareto optimal labels (per node) in each direction

std::vector<std::shared_ptr<labelling::Label>> best_labels¶

vector with pointer to label with least weight (per node) in each direction

std::unique_ptr<std::vector<labelling::Label>> unprocessed_labels¶

heap vector to keep unprocessed labels ordered. the order depends on the on the direction of the search. i.e. forward -> increasing in the monotone resource, backward -> decreasing in the monotone resource.

Next Previous

© Copyright 2020, David Torres Sanchez Revision bfe0b105.

Built with Sphinx using a theme provided by Read the Docs.