Skip to content

pipePacket Class

malottno edited this page Mar 11, 2020 · 3 revisions

pipePacket Class

Pipelines, preprocessors, and several other libraries within LHF use pipePackets to pass relevant data between pipe functions. This class mainly serves to store the associated pipeline data, such as the working data vector, the simplicial complex, and statistics on the size and structure of the working data.

Only a single instance of the pipePacket is used in the current version of LHF. Multithreaded and distributed versions in the future may use the pipePacket to structurally pass data between communicating processes.


bettiBoundaryTableEntry struct

The bettiBoundaryTableEntry struct is defined in the pipePacket.hpp header file. A vector of multiple entries is stored within the pipePacket object.

struct bettiBoundaryTableEntry{
	unsigned bettiDim;
	double birth;
	double death;
	std::set<unsigned> boundaryPoints;
}; 

pipePacket Stored Objects

The pipePacket class defines several objects to be used for storage during LHF pipeline execution.

Object Description
std::string stats; String of statistic output from pipeline functions
std::vector<std::vector<double>> originalData; Original data prior to reduction when using a preprocessor
std::vector<unsigned> originalLabels; Labels for original data mapping to representative centroids for preprocessors
std::vector<std::vector<double>> reducedData; Reduced data when using a preprocessor
simplexBase* complex; Stores the simplicial complex, initialized after creation of the pipePacket
std::vector<std::vector<unsigned>> boundaries; Stores identified boundaries from PH
std::set<double, std::greater<double>> weights; Stores a list of the NN graph weights
std::string bettiOutput; String of betti numbers for file output
std::vector<bettiBoundaryTableEntry> bettiTable; Table for storage of betti and boundary info

These objects persist between pipeline segments and can be used to pass data when designing a preprocessor- or basePipe-inherited class.


pipePacket Member Functions

The pipePacketclass defines several virtual functions to be overridden by a designed pipe class.

pipePacket(const std::string &, const double, const int);
pipePacket(const std::map<std::string, std::string>, const std::string&);
double getSize();

pipePacket::pipePacket

The pipePacket constructor ...

pipePacket::getSize

The getSize method

Clone this wiki locally