Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::glop::VectorIterator< EntryType > Class Template Reference

#include <lp_types.h>

Inheritance diagram for operations_research::glop::VectorIterator< EntryType >:

Public Types

using Index = typename EntryType::Index
 
using Entry = EntryType
 

Public Member Functions

 VectorIterator (const Index *indices, const Fractional *coefficients, EntryIndex i)
 
void operator++ ()
 
bool operator!= (const VectorIterator &other) const
 
const Entryoperator* () const
 

Detailed Description

template<typename EntryType>
class operations_research::glop::VectorIterator< EntryType >

VectorIterator An iterator over the elements of a sparse data structure that stores the elements in arrays for indices and coefficients. The iterator is built as a wrapper over a sparse vector entry class; the concrete entry class is provided through the template argument EntryType.

Definition at line 412 of file lp_types.h.

Member Typedef Documentation

◆ Entry

template<typename EntryType >
using operations_research::glop::VectorIterator< EntryType >::Entry = EntryType

Definition at line 415 of file lp_types.h.

◆ Index

template<typename EntryType >
using operations_research::glop::VectorIterator< EntryType >::Index = typename EntryType::Index

Definition at line 414 of file lp_types.h.

Constructor & Destructor Documentation

◆ VectorIterator()

template<typename EntryType >
operations_research::glop::VectorIterator< EntryType >::VectorIterator ( const Index * indices,
const Fractional * coefficients,
EntryIndex i )
inline

Definition at line 417 of file lp_types.h.

Member Function Documentation

◆ operator!=()

template<typename EntryType >
bool operations_research::glop::VectorIterator< EntryType >::operator!= ( const VectorIterator< EntryType > & other) const
inline

This operator is intended for use in natural range iteration ONLY. Therefore, we prefer to use '<' so that a buggy range iteration which start point is after its end point stops immediately, instead of iterating 2^(number of bits of EntryIndex) times.

Definition at line 422 of file lp_types.h.

◆ operator*()

template<typename EntryType >
const Entry & operations_research::glop::VectorIterator< EntryType >::operator* ( ) const
inline

Definition at line 429 of file lp_types.h.

◆ operator++()

template<typename EntryType >
void operations_research::glop::VectorIterator< EntryType >::operator++ ( )
inline

Definition at line 421 of file lp_types.h.


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