class seams::Neighbours

Overview

Owned neighbour list. More…

#include <include/seams.hpp>
 
class Neighbours: public seams::detail::Handle {
public:
    // methods
 
    std::size_t nnz() const;
    std::vector<int> degrees() const;
    std::vector<std::pair<int, int>> pairs() const;
    ChordlessCycles chordless(int size) const;
};

Inherited Members

public:
    // methods
 
    Handle& operator=(const Handle&);
    Handle& operator=(Handle&& other);
    operator bool() const;

Detailed Documentation

Owned neighbour list.

Move-only. Destruction frees the C handle. The self entry is omitted. A neighbour list is not safe to share across threads.

Methods

std::size_t nnz() const

Number of neighbour pairs, omitting self.

Returns:

The pair count.

std::vector<int> degrees() const

Degree of each atom.

Returns:

One integer per atom. The self entry is not counted.

std::vector<std::pair<int, int>> pairs() const

Directed pairs (atom, neighbour).

Returns:

One pair per stored column. Self is omitted.

ChordlessCycles chordless(int size) const

Chordless cycles of one length on this graph.

Parameters:

size

Cycle length, from 3 through 12.

Returns:

The rows and the per-atom counts of seams_rings_chordless.