OR-Tools  9.6
ShardedWeightedAverage

Detailed Description

Definition at line 39 of file sharded_optimization_utils.h.

Public Member Functions

 ShardedWeightedAverage (const Sharder *sharder)
 
 ShardedWeightedAverage (ShardedWeightedAverage &&)=default
 
ShardedWeightedAverageoperator= (ShardedWeightedAverage &&)=default
 
void Add (const Eigen::VectorXd &datapoint, double weight)
 
void Clear ()
 
bool HasNonzeroWeight () const
 
double Weight () const
 
Eigen::VectorXd ComputeAverage () const
 
int NumTerms () const
 

Constructor & Destructor Documentation

◆ ShardedWeightedAverage() [1/2]

ShardedWeightedAverage ( const Sharder sharder)
explicit

Definition at line 43 of file sharded_optimization_utils.cc.

◆ ShardedWeightedAverage() [2/2]

Member Function Documentation

◆ Add()

void Add ( const Eigen::VectorXd &  datapoint,
double  weight 
)

Definition at line 54 of file sharded_optimization_utils.cc.

◆ Clear()

void Clear ( )

Definition at line 68 of file sharded_optimization_utils.cc.

◆ ComputeAverage()

VectorXd ComputeAverage ( ) const

Definition at line 74 of file sharded_optimization_utils.cc.

◆ HasNonzeroWeight()

bool HasNonzeroWeight ( ) const
inline

Definition at line 58 of file sharded_optimization_utils.h.

◆ NumTerms()

int NumTerms ( ) const
inline

Definition at line 68 of file sharded_optimization_utils.h.

◆ operator=()

ShardedWeightedAverage& operator= ( ShardedWeightedAverage &&  )
default

◆ Weight()

double Weight ( ) const
inline

Definition at line 61 of file sharded_optimization_utils.h.


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