configstl.h

来自「很好的kalman程序。.zip文件包含了所有的用到kalman滤波的库和头文件」· C头文件 代码 · 共 51 行

H
51
字号
//=============================================================================
/**
 *
 * @file ConfigSTL.h
 * 
 * @author Christopher Konvalin <ckonvalin@memsense.com>
 *
 
 */
//=============================================================================

#ifndef MEMS_CONFIG_STL_H
#define MEMS_CONFIG_STL_H

/** 
 * 
 * Defines whether the vector and matrix elements of the filter utilize
 * Standard Template Library (STL) constructs or MEMSense developed
 * MathUtils library.  Generally, the STL is the correct approach for 
 * PC-based implementation, and MathUtils for embedded or firmware.  However,
 * MathUtils may be utilized if a partial or flawed STL implementation is
 * discovered, or a much leaner, more efficient, deployment is desired.
 */

#define HAVE_STL

#ifdef HAVE_STL 
    #include <vector>

    /**
     * Macro specifies that the standard STL std::vector of doubles is to be used.
     */
    #define MEMS_STD_VECTOR std::vector<double>

    /**
     * Macro specifies that a matrix composed of an STL vector of vector of 
     * doubles is to be used.
     */
    #define MEMS_STD_MATRIX std::vector<std::vector<double> >

#else
    #include "MEMS_MathUtils/Vector.h"
    #include "MEMS_MathUtils/Matrix.h"

    #define MEMS_STD_VECTOR mems::Vector
    #define MEMS_STD_MATRIX mems::Matrix
#endif


#endif // MEMS_CONFIG_STL_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?