Thrill
0.1
|
A compile-time fixed-length D-dimensional point with double precision.
Definition at line 28 of file vector.hpp.
#include <vector.hpp>
Public Types | |
using | type = Type |
Public Member Functions | |
Type | Distance (const Vector &b) const |
Type | DistanceSquare (const Vector &b) const |
Type | dot (const Vector &b) const |
Vector | fill (const Type init_val) |
Type | Norm () const |
Vector | operator+ (const Vector &b) const |
Vector & | operator+= (const Vector &b) |
Vector | operator- (const Vector &b) const |
Vector | operator/ (const Type &s) const |
Vector & | operator/= (const Type &s) |
template<typename Archive > | |
void | serialize (Archive &archive) |
Static Public Member Functions | |
static size_t | dim () |
static Vector | Make (size_t D_) |
static Vector | Origin () |
template<typename Distribution , typename Generator > | |
static Vector | Random (size_t dim, Distribution &dist, Generator &gen) |
static size_t | size () |
Public Attributes | |
Type | x [D] |
coordinates array More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Vector &a) |
using type = Type |
Definition at line 34 of file vector.hpp.
|
inlinestatic |
Definition at line 36 of file vector.hpp.
|
inline |
Definition at line 69 of file vector.hpp.
Referenced by StochasticGradientDescent< Vector >::is_converged().
|
inline |
Definition at line 64 of file vector.hpp.
Referenced by KMeansModel< Point >::Classify(), KMeansModel< Point >::ComputeCost(), Vector< D, double >::Distance(), VVector< Type >::Distance(), and examples::k_means::KMeans().
|
inline |
Definition at line 100 of file vector.hpp.
Referenced by LeastSquaresGradient< Vector >::Compute(), and RunStochasticGradGenerated().
|
inline |
Definition at line 48 of file vector.hpp.
Referenced by RunStochasticGradFile(), and RunStochasticGradGenerated().
|
inlinestatic |
Definition at line 39 of file vector.hpp.
|
inline |
Definition at line 59 of file vector.hpp.
Referenced by StochasticGradientDescent< Vector >::is_converged().
Definition at line 72 of file vector.hpp.
Definition at line 77 of file vector.hpp.
Definition at line 81 of file vector.hpp.
|
inline |
Definition at line 86 of file vector.hpp.
|
inline |
Definition at line 91 of file vector.hpp.
|
inlinestatic |
Definition at line 43 of file vector.hpp.
|
inlinestatic |
Definition at line 53 of file vector.hpp.
|
inline |
serialization method for cereal. Keep this, even though Vector is a POD, to serialize fixed-length Vectors that are contained in other structs.
Definition at line 109 of file vector.hpp.
|
inlinestatic |
Definition at line 37 of file vector.hpp.
|
friend |
Definition at line 95 of file vector.hpp.
Type x[D] |
coordinates array
Definition at line 32 of file vector.hpp.
Referenced by Vector< D, double >::DistanceSquare(), Vector< D, double >::dot(), thrill::common::operator*(), Vector< D, double >::operator+(), Vector< D, double >::operator+=(), Vector< D, double >::operator-(), Vector< D, double >::operator/(), Vector< D, double >::Origin(), OutputSVG(), Vector< D, double >::Random(), and RunStochasticGradFile().