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:

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_eltelts
 
int num
 
int allelems
 

Detailed Description

Allows to perform labelling by creating node and connecting them.

Definition at line 24 of file Universe.h.

Constructor & Destructor Documentation

◆ Universe()

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

Definition at line 11 of file Universe.cpp.

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

◆ ~Universe()

cloudViewer::Universe::~Universe ( )

Definition at line 27 of file Universe.cpp.

References elts.

Member Function Documentation

◆ addEdge()

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

Definition at line 53 of file Universe.cpp.

References find(), and join().

◆ 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

Definition at line 29 of file Universe.cpp.

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

Referenced by addEdge().

◆ initialize()

void cloudViewer::Universe::initialize ( )

Initialize all elements to the default values.

Definition at line 18 of file Universe.cpp.

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 
)

Definition at line 40 of file Universe.cpp.

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

Referenced by addEdge().

◆ size()

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

Definition at line 36 of file Universe.h.

Member Data Documentation

◆ allelems

int cloudViewer::Universe::allelems

Definition at line 40 of file Universe.h.

Referenced by initialize(), and Universe().

◆ elts

uni_elt* cloudViewer::Universe::elts

Definition at line 39 of file Universe.h.

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

◆ num

int cloudViewer::Universe::num

Definition at line 40 of file Universe.h.

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


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