utilities.h

来自「amygdata的神经网络算法源代码」· C头文件 代码 · 共 52 行

H
52
字号
/***************************************************************************                          utilities.h  -  description                             -------------------    begin                : Wed May 22 2002    copyright            : (C) 2002 by Rdiger Koch    email                : rkoch@rkoch.org ***************************************************************************//*************************************************************************** *                                                                         * *   This program is free software; you can redistribute it and/or modify  * *   it under the terms of the GNU General Public License as published by  * *   the Free Software Foundation; either version 2 of the License, or     * *   (at your option) any later version.                                   * *                                                                         * ***************************************************************************/#ifndef UTILITIES_H#define UTILITIES_H#include <string>#include <cmath>#include <amygdala/amygdalaclass.h>/**  * @brief wrap some useful functions and classes  * wrap some useful functions and classes not directly related to the core  * of Amygdala  */namespace Utilities {    using Amygdala::AmTimeInt;    using std::string;        /** @return a random number between 0. and 100.  */    float RandPercent();    float GaussRand(float mean, float sigma);    /** @return a string representation of an integer */    string itostr(int val);    /** @return a string representation of a float */    string ftostr(float val);    /** Round the time to the nearest time step.     * @param time Reference to the time value that will be rounded.     * @param stepSize Size of the simulation time step. */    void RoundTime(AmTimeInt& time, const AmTimeInt& stepSize);}#endif

⌨️ 快捷键说明

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