ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::Universe Class Reference

Allows to perform labelling by creating node and connecting them. More...

#include <Universe.h>

Collaboration diagram for cloudViewer::Universe:
[legend]

Public Member Functions

 Universe (int elements)
 
 ~Universe ()
 
void initialize ()
 Initialize all elements to the default values. More...
 
int find (int x)
 
void join (int x, int y)
 
void addEdge (int x, int y)
 
int size (int x) const
 

Public Attributes

uni_elt * elts
 
int num
 
int allelems
 

Detailed Description

Allows to perform labelling by creating node and connecting them.

Constructor & Destructor Documentation

◆ Universe()

cloudViewer::Universe::Universe ( int  elements)
explicit

References allelems, elts, initialize(), and num.

◆ ~Universe()

cloudViewer::Universe::~Universe ( )

References elts.

Member Function Documentation

◆ addEdge()

void cloudViewer::Universe::addEdge ( int  x,
int  y 
)

References a, find(), join(), x, and y.

◆ find()

int cloudViewer::Universe::find ( int  x)

Retrieve the smallest index of the elements connected to x.

Warning
: it updates the local indexes along the way

References elts, cloudViewer::uni_elt::p, x, and y.

Referenced by addEdge().

◆ initialize()

void cloudViewer::Universe::initialize ( )

Initialize all elements to the default values.

References allelems, elts, num, cloudViewer::uni_elt::p, cloudViewer::uni_elt::rank, and cloudViewer::uni_elt::size.

Referenced by Universe().

◆ join()

void cloudViewer::Universe::join ( int  x,
int  y 
)

◆ size()

int cloudViewer::Universe::size ( int  x) const
inline

References x.

Member Data Documentation

◆ allelems

int cloudViewer::Universe::allelems

Referenced by initialize(), and Universe().

◆ elts

uni_elt* cloudViewer::Universe::elts

◆ num

int cloudViewer::Universe::num

Referenced by initialize(), join(), and Universe().


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