Loading...
Searching...
No Matches
primitive Namespace Reference

Functions for generating primitive rings. More...

Classes

struct  Vertex
 This is a collection of elements, for each point, required for graph traversal. More...
struct  Graph
 This is a per-frame object, containing all the vertices for the particular frame, along with the vector of rings generated. More...
class  RingUpdater
 Exact frame-to-frame maintenance of the primitive ring network. More...

Functions

std::vector< std::vector< int > > ringNetwork (const std::vector< std::vector< int > > &nList, int maxDepth)
Graph populateGraphFromNListID (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &neighHbondList)
Graph populateGraphFromIndices (const std::vector< std::vector< int > > &nList)
void restoreEdgesFromIndices (Graph &fullGraph, const std::vector< std::vector< int > > &nList)
Graph countAllRingsFromIndex (const std::vector< std::vector< int > > &neighHbondList, int maxDepth)
 Creates a vector of vectors of all possible rings.
void removeNonSPrings (Graph &fullGraph)
 Removes the non-SP rings, using the Franzblau shortest path criterion.
int findRings (Graph &fullGraph, int v, std::vector< int > &visited, int maxDepth, int depth, int root=-1)
 Main function that searches for all rings.
int shortestPath (Graph &fullGraph, int v, int goal, std::vector< int > &path, std::vector< int > &visited, int maxDepth, int depth=1)
 Calculates the shortest path.
Graph clearGraph (Graph &currentGraph)
 Function for clearing vectors in Graph after multiple usage.

Detailed Description

Functions for generating primitive rings.

This namespace contains struct definitions and functions that are used for generating primitive (shortest-path) rings (directed cyclic graphs).

The Vertex object is a collection of elements for each point, required for graph traversal. The Graph object is an object for the whole frame, containing the information of all vertices, and a row-ordered vector of vector of the rings generated.

The Franzblau shortest-path criterion has been used. The SP (shortest-path) criterion is midway between the least restrictive and most restrictive criteria in the hierarchy.

The following is the procedure for finding primitive rings:

  1. All possible rings (including non-SP) rings are found, in the primitive::countAllRingsFromIndex function, using the backtracking algorithm. This is a recursive algorithm.
  2. The non-SP rings are then removed from the list of all rings, using the Franzblau shortest path criterion (primitive::removeNonSPrings), answered by a hop-bounded breadth-first sweep per vertex.

Changelog