Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::pdlp::Sharder::Shard Class Reference

#include <sharder.h>

Public Member Functions

Eigen::VectorBlock< const Eigen::VectorXd > operator() (const Eigen::VectorXd &vector) const
 Returns this shard of vector.
 
Eigen::VectorBlock< Eigen::VectorXd > operator() (Eigen::VectorXd &vector) const
 Returns this shard of vector in mutable form.
 
Eigen::VectorBlock< const Eigen::VectorXd > operator() (Eigen::VectorBlock< const Eigen::VectorXd > vector) const
 Returns this shard of vector.
 
Eigen::VectorBlock< Eigen::VectorXd > operator() (Eigen::VectorBlock< Eigen::VectorXd > vector) const
 Returns this shard of vector in mutable form.
 
auto operator() (const Eigen::DiagonalMatrix< double, Eigen::Dynamic > &diag) const -> decltype(diag.diagonal().segment(0, 0).asDiagonal())
 
ConstSparseColumnBlock operator() (const Eigen::SparseMatrix< double, Eigen::ColMajor, int64_t > &matrix) const
 Returns this shard of the columns of matrix.
 
SparseColumnBlock operator() (Eigen::SparseMatrix< double, Eigen::ColMajor, int64_t > &matrix) const
 Returns this shard of the columns of matrix in mutable form.
 
int Index () const
 

Friends

class Sharder
 

Detailed Description

This class extracts a particular shard of vectors or matrices passed to it. See ParallelForEachShard(). Caution: Like absl::Span, Shard::operator() returns mutable or immutable views into the vector or matrix argument. The underlying object must outlive the view. Extra Caution: The const& arguments for the immutable views can bind to temporary objects, e.g., shard(3*a) will create a view into the "3*a" object that will be destroyed immediately after the shard is created.

Definition at line 55 of file sharder.h.

Member Function Documentation

◆ Index()

int operations_research::pdlp::Sharder::Shard::Index ( ) const
inline

A non-negative identifier for this shard, less than NumShards() of the parent Sharder.

Definition at line 127 of file sharder.h.

◆ operator()() [1/7]

auto operations_research::pdlp::Sharder::Shard::operator() ( const Eigen::DiagonalMatrix< double, Eigen::Dynamic > & diag) const -> decltype(diag.diagonal().segment(0, 0).asDiagonal())
inline

Returns this shard of diag. Note that the shard is a square diagonal matrix, not a block of columns of original length.

Definition at line 91 of file sharder.h.

◆ operator()() [2/7]

ConstSparseColumnBlock operations_research::pdlp::Sharder::Shard::operator() ( const Eigen::SparseMatrix< double, Eigen::ColMajor, int64_t > & matrix) const
inline

Returns this shard of the columns of matrix.

This is a guard against implicit conversions, because the return type of middleCols is not 100% clear from the documentation.

Definition at line 100 of file sharder.h.

◆ operator()() [3/7]

Eigen::VectorBlock< const Eigen::VectorXd > operations_research::pdlp::Sharder::Shard::operator() ( const Eigen::VectorXd & vector) const
inline

Returns this shard of vector.

Definition at line 58 of file sharder.h.

◆ operator()() [4/7]

SparseColumnBlock operations_research::pdlp::Sharder::Shard::operator() ( Eigen::SparseMatrix< double, Eigen::ColMajor, int64_t > & matrix) const
inline

Returns this shard of the columns of matrix in mutable form.

This is a guard against implicit conversions, because the return type of middleCols is not 100% clear from the documentation.

Definition at line 114 of file sharder.h.

◆ operator()() [5/7]

Eigen::VectorBlock< const Eigen::VectorXd > operations_research::pdlp::Sharder::Shard::operator() ( Eigen::VectorBlock< const Eigen::VectorXd > vector) const
inline

Returns this shard of vector.

Definition at line 72 of file sharder.h.

◆ operator()() [6/7]

Eigen::VectorBlock< Eigen::VectorXd > operations_research::pdlp::Sharder::Shard::operator() ( Eigen::VectorBlock< Eigen::VectorXd > vector) const
inline

Returns this shard of vector in mutable form.

Definition at line 81 of file sharder.h.

◆ operator()() [7/7]

Eigen::VectorBlock< Eigen::VectorXd > operations_research::pdlp::Sharder::Shard::operator() ( Eigen::VectorXd & vector) const
inline

Returns this shard of vector in mutable form.

Definition at line 65 of file sharder.h.

Friends And Related Symbol Documentation

◆ Sharder

friend class Sharder
friend

Definition at line 130 of file sharder.h.


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