Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::SparsePermutation Class Reference

Detailed Description

Definition at line 28 of file sparse_permutation.h.

#include <sparse_permutation.h>

Classes

struct  Iterator

Public Member Functions

 SparsePermutation (int size)
int Size () const
int NumCycles () const
const std::vector< int > & Support () const
Iterator Cycle (int i) const
int LastElementInCycle (int i) const
int Image (int element) const
int InverseImage (int element) const
void AddToCurrentCycle (int x)
void CloseCurrentCycle ()
void RemoveCycles (absl::Span< const int > cycle_indices)
std::string DebugString () const
template<typename Collection>
void ApplyToDenseCollection (Collection &span) const

Constructor & Destructor Documentation

◆ SparsePermutation()

operations_research::SparsePermutation::SparsePermutation ( int size)
inlineexplicit

Definition at line 30 of file sparse_permutation.h.

Member Function Documentation

◆ AddToCurrentCycle()

void operations_research::SparsePermutation::AddToCurrentCycle ( int x)
inline

Definition at line 93 of file sparse_permutation.h.

◆ ApplyToDenseCollection()

template<typename Collection>
void operations_research::SparsePermutation::ApplyToDenseCollection ( Collection & span) const

Definition at line 141 of file sparse_permutation.h.

◆ CloseCurrentCycle()

void operations_research::SparsePermutation::CloseCurrentCycle ( )
inline

Definition at line 99 of file sparse_permutation.h.

◆ Cycle()

SparsePermutation::Iterator operations_research::SparsePermutation::Cycle ( int i) const
inline

Definition at line 126 of file sparse_permutation.h.

◆ DebugString()

std::string operations_research::SparsePermutation::DebugString ( ) const

Definition at line 56 of file sparse_permutation.cc.

◆ Image()

int operations_research::SparsePermutation::Image ( int element) const

Definition at line 84 of file sparse_permutation.cc.

◆ InverseImage()

int operations_research::SparsePermutation::InverseImage ( int element) const

Definition at line 97 of file sparse_permutation.cc.

◆ LastElementInCycle()

int operations_research::SparsePermutation::LastElementInCycle ( int i) const
inline

Definition at line 133 of file sparse_permutation.h.

◆ NumCycles()

int operations_research::SparsePermutation::NumCycles ( ) const
inline

Definition at line 34 of file sparse_permutation.h.

◆ RemoveCycles()

void operations_research::SparsePermutation::RemoveCycles ( absl::Span< const int > cycle_indices)

Definition at line 27 of file sparse_permutation.cc.

◆ Size()

int operations_research::SparsePermutation::Size ( ) const
inline

Definition at line 33 of file sparse_permutation.h.

◆ Support()

const std::vector< int > & operations_research::SparsePermutation::Support ( ) const
inline

Definition at line 38 of file sparse_permutation.h.


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