|
|
template<typename Arg , std::enable_if_t< gaussian_distribution< Arg > and not std::is_base_of_v< GaussianDistribution, std::decay_t< Arg >> and compares_with< typename DistributionTraits< Arg >::StaticDescriptor, StaticDescriptor >, int > = 0> |
| | GaussianDistribution (Arg &&arg) |
| | Construct from related distribution.
|
| |
|
| GaussianDistribution (Mean &&mean, Covariance &&cov) |
| | Construct from an rvalue of a mean and a covariance.
|
| |
|
template<typename M , std::enable_if_t< typed_matrix< M > and vector< M > and has_untyped_index< M, 1 > and compares_with< vector_space_descriptor_of_t< M, 0 >, StaticDescriptor >, int > = 0> |
| | GaussianDistribution (M &&mean, Covariance &&cov) |
| | Construct from a typed_matrix and an rvalue of a covariance.
|
| |
|
template<typename M , std::enable_if_t< typed_matrix_nestable< M > and vector< M > and(index_dimension_of< M, 0 >::value==dim), int > = 0> |
| | GaussianDistribution (M &&mean, Covariance &&cov) |
| | Construct from a typed_matrix_nestable and an rvalue of a covariance.
|
| |
|
template<typename Cov , std::enable_if_t<(covariance< Cov > or(typed_matrix< Cov > and square_shaped< Cov >)) and compares_with< vector_space_descriptor_of_t< Cov, 0 >, StaticDescriptor >, int > = 0> |
| | GaussianDistribution (Mean &&mean, Cov &&cov) |
| | Construct from an rvalue of a mean and a covariance, typed_matrix, or covariance_nestable.
|
| |
|
template<typename Cov , std::enable_if_t< covariance_nestable< Cov > and(index_dimension_of< Cov, 0 >::value==dim), int > = 0> |
| | GaussianDistribution (Mean &&mean, Cov &&cov) |
| |
| template<typename M , typename Cov , std::enable_if_t< typed_matrix< M > and vector< M > and has_untyped_index< M, 1 > and compares_with< vector_space_descriptor_of_t< M, 0 >, StaticDescriptor > and(covariance< Cov > or typed_matrix< Cov >) and compares_with< vector_space_descriptor_of_t< Cov, 0 >, StaticDescriptor >, int > = 0> |
| | GaussianDistribution (M &&mean, Cov &&cov) |
| | Construct from matrices representing a mean and a covariance. More...
|
| |
| template<typename M , typename Cov , std::enable_if_t< typed_matrix< M > and vector< M > and has_untyped_index< M, 1 > and compares_with< vector_space_descriptor_of_t< M, 0 >, StaticDescriptor > and covariance_nestable< Cov > and(index_dimension_of< Cov, 0 >::value==dim), int > = 0> |
| | GaussianDistribution (M &&mean, Cov &&cov) |
| | Construct from matrices representing a mean and a covariance. More...
|
| |
| template<typename M , typename Cov , std::enable_if_t< typed_matrix_nestable< M > and vector< M > and(index_dimension_of< M, 0 >::value==dim) and(covariance< Cov > or typed_matrix< Cov >) and compares_with< vector_space_descriptor_of_t< Cov, 0 >, StaticDescriptor >, int > = 0> |
| | GaussianDistribution (M &&mean, Cov &&cov) |
| | Construct from matrices representing a mean and a covariance. More...
|
| |
| template<typename M , typename Cov , std::enable_if_t< typed_matrix_nestable< M > and vector< M > and(index_dimension_of< M, 0 >::value==dim) and covariance_nestable< Cov > and(index_dimension_of< Cov, 0 >::value==dim), int > = 0> |
| | GaussianDistribution (M &&mean, Cov &&cov) |
| | Construct from matrices representing a mean and a covariance. More...
|
| |
|
template<typename Cov , std::enable_if_t<(covariance< Cov > or(typed_matrix< Cov > and square_shaped< Cov >)) and compares_with< vector_space_descriptor_of_t< Cov, 0 >, StaticDescriptor >, int > = 0> |
| | GaussianDistribution (Cov &&cov) |
| | Construct with only a covariance or square typed_matrix (mean is set to zero).
|
| |
|
template<typename Cov , std::enable_if_t< covariance_nestable< Cov > and(index_dimension_of< Cov, 0 >::value==dim), int > = 0> |
| | GaussianDistribution (Cov &&cov) |
| | Construct using only a covariance_nestable (the mean is set to zero).
|
| |
|
template<typename Arg , std::enable_if_t< gaussian_distribution< Arg > and compares_with< typename DistributionTraits< Arg >::StaticDescriptor, StaticDescriptor >, int > = 0> |
| GaussianDistribution & | operator= (Arg &&arg) |
| | Assign from another compatible distribution.
|
| |
|
auto & | operator+= (const GaussianDistribution &arg) |
| |
|
auto & | operator-= (const GaussianDistribution &arg) |
| |
|
template<typename S , std::enable_if_t< stdex::convertible_to< S, const Scalar >, int > = 0> |
| auto & | operator*= (const S scale) |
| |
|
template<typename S , std::enable_if_t< stdex::convertible_to< S, const Scalar >, int > = 0> |
| auto & | operator/= (const S scale) |
| |
| auto | operator() () const |
| | Generate a random value from the distribution. More...
|
| |
| template<typename... Z, std::enable_if_t<(sizeof...(Z) > 0> |
| Scalar | log_likelihood (const Z &...z) const |
| | Log-likelihood function for a set of i.i.d. More...
|
| |
|
Scalar | entropy () const |
| | Entropy of the distribution, in bits.
|
| |
template<typename StaticDescriptor, typename MeanNestedMatrix, typename CovarianceNestedMatrix, typename random_number_engine>
struct OpenKalman::GaussianDistribution< StaticDescriptor, MeanNestedMatrix, CovarianceNestedMatrix, random_number_engine >
A Gaussian distribution, defined in terms of a Mean and a Covariance.
- Template Parameters
-
| Descriptor | Coefficient types. |
| MeanNestedMatrix | The underlying native matrix for the Mean. |
| CovarianceNestedMatrix | The underlying native matrix (triangular or self-adjoint) for the Covariance. |
| random_number_engine | A random number engine compatible with the c++ standard library (e.g., std::mt19937). |
- Todo:
- Change to std::mt19937_64 ?