ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
Universe.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 // LOCAL
11 #include "CVCoreLib.h"
12 
13 namespace cloudViewer {
14 
15 typedef struct {
16  int rank;
17  int p;
18  int size;
19 } uni_elt;
20 
25 public:
26  explicit Universe(int elements);
27  ~Universe();
29  void initialize();
32  int find(int x);
33  void join(int x, int y);
34  void addEdge(int x, int y);
35 
36  inline int size(int x) const { return elts[x].size; }
37 
38 public:
40  int num, allelems;
41 };
42 
43 } // namespace cloudViewer
#define CV_CORE_LIB_API
Definition: CVCoreLibWin.h:15
Allows to perform labelling by creating node and connecting them.
Definition: Universe.h:24
int size(int x) const
Definition: Universe.h:36
Generic file read and write utility for python interface.