<commit_before>/*
 * This is part of the FL library, a C++ Bayesian filtering library
 * (https://github.com/filtering-library)
 *
 * Copyright (c) 2014 <NAME> (<EMAIL>)
 * Copyright (c) 2014 <NAME> (<EMAIL>)
 *
 * Max-Planck Institute for Intelligent Systems, AMD Lab
 * University of Southern California, CLMC Lab
 *
 * This Source Code Form is subject to the terms of the MIT License (MIT).
 * A copy of the license can be found in the LICENSE file distributed with this
 * source code.
 */

/**
 * \file gaussian.hpp
 * \date October 2014
 * \author <NAME> (<EMAIL>)
 * \author <NAME> (<EMAIL>)
 */

#ifndef FL__DISTRIBUTION__GAUSSIAN_HPP
#define FL__DISTRIBUTION__GAUSSIAN_HPP

#include <Eigen/Dense>

#include <vector>
#include <string>
#include <cstddef>
#include <type_traits>

#include <fl/util/traits.hpp>
#include <fl/exception/exception.hpp>
#include <fl/distribution/interface/moments.hpp>
#include <fl/distribution/interface/evaluation.hpp>
#include <fl/distribution/interface/standard_gaussian_mapping.hpp>

namespace fl
{

// Forward declarations
template <typename Variate> class Gaussian;

/**
 * Gaussian distribution traits. This trait definition contains all types used
 * internally within the distribution. Additionally, it provides the types
 * needed externally to use the Gaussian.
 */
template <typename Var>
struct Traits<Gaussian<Var>>
{    
    enum
    {
        /**
         * \brief Gaussian dimension
         *
         * For fixed-size Point type and hence a fixed-size Gaussian, the
         * \c Dimension value is greater zero. Dynamic-size Gaussians have the
         * dymension Eigen::Dynamic.
         */
        Dimension = Var::RowsAtCompileTime
    };

    /**
     * \brief Gaussian variable type
     */
    typedef Var Variate;

    /**
     * \brief Internal scalar type (e.g. double, float, std::complex, etc)
     */
    typedef typename Variate::Scalar Scalar;

    /**
     * \brief Random variable type. The Noise type is used in mapping of noise
     * samples into the current Gaussian space.
     */
    typedef Eigen::Matrix<Scalar, Dimension, 1> StandardVariate;

    /**
     * \brief Second moment type
     */
    typedef Eigen::Matrix<Scalar, Dimension, Dimension> SecondMoment;

    /**
     * \brief Moments interface of a Gaussian
     */
    typedef Moments<Variate, SecondMoment> MomentsBase;

    /**
     * \brief Evalluation interface of a Gaussian<commit_msg>fixed typo<commit_after>/*
 * This is part of the FL library, a C++ Bayesian filtering library
 * (https://github.com/filtering-library)
 *
 * Copyright (c) 2014 <NAME> (<EMAIL>)
 * Copyright (c) 2014 <NAME> (<EMAIL>)
 *
 * Max-Planck Institute for Intelligent Systems, AMD Lab
 * University of Southern California, CLMC Lab
 *
 * This Source Code Form is subject to the terms of the MIT License (MIT).
 * A copy of the license can be found in the LICENSE file distributed with this
 * source code.
 */

/**
 * \file gaussian.hpp
 * \date October 2014
 * \author <NAME> (<EMAIL>)
 * \author <NAME> (<EMAIL>)
 */

#ifndef FL__DISTRIBUTION__GAUSSIAN_HPP
#define FL__DISTRIBUTION__GAUSSIAN_HPP

#include <Eigen/Dense>

#include <vector>
#include <string>
#include <cstddef>
#include <type_traits>

#include <fl/util/traits.hpp>
#include <fl/exception/exception.hpp>
#include <fl/distribution/interface/moments.hpp>
#include <fl/distribution/interface/evaluation.hpp>
#include <fl/distribution/interface/standard_gaussian_mapping.hpp>

namespace fl
{

// Forward declarations
template <typename Variate> class Gaussian;

/**
 * Gaussian distribution traits. This trait definition contains all types used
 * internally within the distribution. Additionally, it provides the types
 * needed externally to use the Gaussian.
 */
template <typename Var>
struct Traits<Gaussian<Var>>
{    
    enum
    {
        /**
         * \brief Gaussian dimension
         *
         * For fixed-size Point type and hence a fixed-size Gaussian, the
         * \c Dimension value is greater zero. Dynamic-size Gaussians have the
         * dymension Eigen::Dynamic.
         */
        Dimension = Var::RowsAtCompileTime
    };

    /**
     * \brief Gaussian variable type
     */
    typedef Var Variate;

    /**
     * \brief Internal scalar type (e.g. double, float, std::complex, etc)
     */
    typedef typename Variate::Scalar Scalar;

    /**
     * \brief Random variable type. The Noise type is used in mapping of noise
     * samples into the current Gaussian space.
     */
    typedef Eigen::Matrix<Scalar, Dimension, 1> StandardVariate;

    /**
     * \brief Second moment type
     */
    typedef Eigen::Matrix<Scalar, Dimension, Dimension> SecondMoment;

    /**
     * \brief Moments interface of a Gaussian
     */
    typedef Moments<Variate, SecondMoment> MomentsBase;

    /**
     * \brief Evaluation interface of a Gaussian
{'fraction_non_alphanumeric': 0.10493827160493827, 'fraction_numerical': 0.005349794238683128, 'mean_word_length': 3.0986509274873524, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6327605', 'n_tokens_mistral': 1468, 'n_tokens_neox': 1370, 'n_words': 478}