seams-core v2.14.0
libyodaLib, the C++ engine of d-SEAMS
Loading...
Searching...
No Matches
seams::ChordlessCycles Struct Reference

Chordless cycles of one length. More...

#include <include/seams.hpp>

Public Member Functions

std::size_t count () const
 Number of cycles.
std::vector< int > cycle (std::size_t index) const
 Atom indices of one cycle.

Public Attributes

int size = 0
 Cycle length.
std::vector< int > atoms
 count() rows of size indices.
std::vector< int > per_atom
 Cycles through each atom.

Detailed Description

Chordless cycles of one length.

atoms holds count() rows of size atom indices, in the order seams_rings_chordless writes them. per_atom is the number of cycles through each atom.

Definition at line 616 of file seams.hpp.

Member Function Documentation

◆ count()

std::size_t seams::ChordlessCycles::count ( ) const
inlinenodiscard

Number of cycles.

Definition at line 622 of file seams.hpp.

622 {
623 return size > 0 ? atoms.size() / static_cast<std::size_t>(size) : 0;
624 }
int size
Cycle length.
Definition seams.hpp:617
std::vector< int > atoms
count() rows of size indices.
Definition seams.hpp:618

◆ cycle()

std::vector< int > seams::ChordlessCycles::cycle ( std::size_t index) const
inlinenodiscard

Atom indices of one cycle.

Definition at line 626 of file seams.hpp.

626 {
627 const auto first =
628 atoms.begin() + static_cast<std::ptrdiff_t>(index * static_cast<std::size_t>(size));
629 return std::vector<int>(first, first + size);
630 }

Member Data Documentation

◆ atoms

std::vector<int> seams::ChordlessCycles::atoms

count() rows of size indices.

Definition at line 618 of file seams.hpp.

◆ per_atom

std::vector<int> seams::ChordlessCycles::per_atom

Cycles through each atom.

Definition at line 619 of file seams.hpp.

◆ size

int seams::ChordlessCycles::size = 0

Cycle length.

Definition at line 617 of file seams.hpp.


The documentation for this struct was generated from the following file: