8 #ifndef DISTRIBUTION_DISTRIBUTIONUTILS_H_
9 #define DISTRIBUTION_DISTRIBUTIONUTILS_H_
45 double dotProduct(
const Distribution &dist, std::size_t numVariables,
46 const std::vector<double> &v1,
const std::vector<double> &v2);
47 double dotProduct(
const Distribution &dist, std::size_t numVariables,
48 const std::vector<float> &v1,
const std::vector<float> &v2);
49 double dotProduct(
const Distribution &dist, std::size_t numVariables,
50 const std::vector<int> &v1,
const std::vector<int> &v2);
69 size_t numVariables,
const std::vector<double> &v);
71 size_t numVariables,
const std::vector<float> &v);
73 size_t numVariables,
const std::vector<int> &v);
75 size_t numVariables,
const std::vector<std::string> &v);
77 size_t numVariables,
const std::vector<util::DateTime> &v);
91 const eckit::mpi::Comm & comm,
92 std::shared_ptr<const Distribution> master,
93 const std::vector<std::size_t> &masterRecordNums);
class for distributing obs across multiple process elements
std::size_t globalNumNonMissingObs(const Distribution &dist, size_t numVariables, const std::vector< double > &v)
Counts unique non-missing observations in a vector.
double dotProduct(const Distribution &dist, std::size_t numVariables, const std::vector< double > &v1, const std::vector< double > &v2)
std::size_t globalNumNonMissingObs(const Distribution &dist, std::size_t numVariables, const std::vector< double > &v)
std::shared_ptr< Distribution > createReplicaDistribution(const eckit::mpi::Comm &comm, std::shared_ptr< const Distribution > master, const std::vector< std::size_t > &masterRecordNums)
Create a suitable replica distribution for the distribution master.