The bliss C++ API
orbit.hh
1 #pragma once
2 
3 /*
4  Copyright (c) 2003-2021 Tommi Junttila
5  Released under the GNU Lesser General Public License version 3.
6 
7  This file is part of bliss.
8 
9  bliss is free software: you can redistribute it and/or modify
10  it under the terms of the GNU Lesser General Public License as published by
11  the Free Software Foundation, version 3 of the License.
12 
13  bliss is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public License
19  along with bliss. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
22 namespace bliss {
23 
36 class Orbit
37 {
38  class OrbitEntry
39  {
40  public:
41  unsigned int element;
42  OrbitEntry *next;
43  unsigned int size;
44  };
45 
46  OrbitEntry *orbits;
47  OrbitEntry **in_orbit;
48  unsigned int nof_elements;
49  unsigned int _nof_orbits;
50  void merge_orbits(OrbitEntry *o1, OrbitEntry *o2);
51 
52 public:
58  Orbit();
59  ~Orbit();
60 
69  void init(const unsigned int N);
70 
75  void reset();
76 
82  void merge_orbits(unsigned int e1, unsigned int e2);
83 
88  bool is_minimal_representative(unsigned int e) const;
89 
94  unsigned int get_minimal_representative(unsigned int e) const;
95 
100  unsigned int orbit_size(unsigned int e) const;
101 
106  unsigned int nof_orbits() const {return _nof_orbits; }
107 };
108 
109 } // namespace bliss
Definition: abstractgraph.cc:35
unsigned int orbit_size(unsigned int e) const
Definition: orbit.cc:145
unsigned int nof_orbits() const
Definition: orbit.hh:106
Orbit()
Definition: orbit.cc:26
A class for representing orbit information.
Definition: orbit.hh:36
bool is_minimal_representative(unsigned int e) const
Definition: orbit.cc:130
unsigned int get_minimal_representative(unsigned int e) const
Definition: orbit.cc:136
void reset()
Definition: orbit.cc:72
void init(const unsigned int N)
Definition: orbit.cc:59