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

NOTE(user): T=bool is not yet supported (the [] operator doesn't work). More...

#include <flat_matrix.h>

Classes

struct  ConstRows
 
class  ConstRowsIterator
 

Public Member Functions

 FlatMatrix ()
 
 FlatMatrix (size_t num_rows, size_t num_cols)
 
 FlatMatrix (size_t num_rows, size_t num_cols, const T &elem)
 
size_t num_rows () const
 
size_t num_cols () const
 
absl::Span< T > operator[] (size_t row)
 
absl::Span< const T > operator[] (size_t row) const
 
absl::Span< T > all_elements ()
 All the elements of the FlatMatrix.
 
absl::Span< const T > all_elements () const
 
ConstRows rows ()
 

Detailed Description

template<typename T>
class operations_research::FlatMatrix< T >

NOTE(user): T=bool is not yet supported (the [] operator doesn't work).

Definition at line 32 of file flat_matrix.h.

Constructor & Destructor Documentation

◆ FlatMatrix() [1/3]

template<typename T >
operations_research::FlatMatrix< T >::FlatMatrix ( )
inline

Definition at line 34 of file flat_matrix.h.

◆ FlatMatrix() [2/3]

template<typename T >
operations_research::FlatMatrix< T >::FlatMatrix ( size_t num_rows,
size_t num_cols )
inline

Definition at line 35 of file flat_matrix.h.

◆ FlatMatrix() [3/3]

template<typename T >
operations_research::FlatMatrix< T >::FlatMatrix ( size_t num_rows,
size_t num_cols,
const T & elem )
inline

Definition at line 39 of file flat_matrix.h.

Member Function Documentation

◆ all_elements() [1/2]

template<typename T >
absl::Span< T > operations_research::FlatMatrix< T >::all_elements ( )
inline

All the elements of the FlatMatrix.

Definition at line 55 of file flat_matrix.h.

◆ all_elements() [2/2]

template<typename T >
absl::Span< const T > operations_research::FlatMatrix< T >::all_elements ( ) const
inline

Definition at line 56 of file flat_matrix.h.

◆ num_cols()

template<typename T >
size_t operations_research::FlatMatrix< T >::num_cols ( ) const
inline

Definition at line 45 of file flat_matrix.h.

◆ num_rows()

template<typename T >
size_t operations_research::FlatMatrix< T >::num_rows ( ) const
inline

Definition at line 44 of file flat_matrix.h.

◆ operator[]() [1/2]

template<typename T >
absl::Span< T > operations_research::FlatMatrix< T >::operator[] ( size_t row)
inline

Definition at line 47 of file flat_matrix.h.

◆ operator[]() [2/2]

template<typename T >
absl::Span< const T > operations_research::FlatMatrix< T >::operator[] ( size_t row) const
inline

Definition at line 50 of file flat_matrix.h.

◆ rows()

template<typename T >
ConstRows operations_research::FlatMatrix< T >::rows ( )
inline

Definition at line 85 of file flat_matrix.h.


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