No Matches
Public Member Functions | Public Attributes | List of all members
ttk::VisitedMask Class Reference

Auto-cleaning re-usable graph propagations data structure. More...

#include <VisitedMask.h>

Public Member Functions

 VisitedMask (std::vector< bool > &isVisited, std::vector< SimplexId > &visitedIds)
 ~VisitedMask ()
void insert (const SimplexId id)
bool remove (const SimplexId id)

Public Attributes

std::vector< bool > & isVisited_
std::vector< SimplexId > & visitedIds_

Detailed Description

Auto-cleaning re-usable graph propagations data structure.

This structure stores two vector references. The first vector maps the nodes of a graph to a boolean (true if the node is visited, false if not). The second reference points to a vector that contains the visited nodes indices. Using RAII, the boolean vector is cleaned using the indices vector when this structure goes out of scope. See ttk::MorseSmaleComplex::getSaddleConnectors for an example use.

Pierre Guillou
November 2021.

Definition at line 27 of file VisitedMask.h.

Constructor & Destructor Documentation

◆ VisitedMask()

ttk::VisitedMask::VisitedMask ( std::vector< bool > &  isVisited,
std::vector< SimplexId > &  visitedIds 

Definition at line 31 of file VisitedMask.h.

◆ ~VisitedMask()

ttk::VisitedMask::~VisitedMask ( )

Definition at line 36 of file VisitedMask.h.

Member Function Documentation

◆ insert()

void ttk::VisitedMask::insert ( const SimplexId  id)

Definition at line 45 of file VisitedMask.h.

◆ remove()

bool ttk::VisitedMask::remove ( const SimplexId  id)

Definition at line 50 of file VisitedMask.h.

Member Data Documentation

◆ isVisited_

std::vector<bool>& ttk::VisitedMask::isVisited_

Definition at line 28 of file VisitedMask.h.

◆ visitedIds_

std::vector<SimplexId>& ttk::VisitedMask::visitedIds_

Definition at line 29 of file VisitedMask.h.

The documentation for this class was generated from the following file: