⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 globalrandomgenerator.h

📁 遗传算法的四个源程序和源代码
💻 H
字号:

/*! \file GlobalRandomGenerator.h
    \brief This file contains declaration of global random number generator objects.
*/

/*
 * 
 * website: http://www.coolsoft-sd.com/
 * contact: support@coolsoft-sd.com
 *
 */

/*
 * Genetic Algorithm Library
 * Copyright (C) 2007-2008 Coolsoft Software Development
 * 
 * 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.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 */

#include "Platform.h"
#include "Random.h"

#if defined(GAL_API_EXPORTING)

/// <summary>Global object used by GAL to generate random integer numbers. It cannot be used prior calling <see cref="GaInitialize" />
/// and after calling <see cref="GaFinalize" />. For more details see <see cref="GaRandomInteger" /> class.</summary>
extern Common::GaRandomInteger* GaGlobalRandomIntegerGenerator;

/// <summary>Global object used by GAL to generate random single precision floating point numbers. It cannot be used prior calling <see cref="GaInitialize" />
/// and after calling <see cref="GaFinalize" />. For more details see <see cref="GaRandomInteger" /> class.</summary>
extern Common::GaRandomFloat* GaGlobalRandomFloatGenerator;

/// <summary>Global object used by GAL to generate random double precision floating point numbers. It cannot be used prior calling <see cref="GaInitialize" />
/// and after calling <see cref="GaFinalize" />. For more details see <see cref="GaRandomInteger" /> class.</summary>
extern Common::GaRandomDouble* GaGlobalRandomDoubleGenerator;

/// <summary>Global object used by GAL to generate random Boolean values. It cannot be used prior calling <see cref="GaInitialize" />
/// and after calling <see cref="GaFinalize" />. For more details see <see cref="GaRandomInteger" /> class.</summary>
extern Common::GaRandomBool* GaGlobalRandomBoolGenerator;

#else

#if defined(GAL_PLATFORM_WIN)

GAL_API Common::GaRandomInteger* GaGlobalRandomIntegerGenerator;
GAL_API Common::GaRandomFloat* GaGlobalRandomFloatGenerator;
GAL_API Common::GaRandomDouble* GaGlobalRandomDoubleGenerator;
GAL_API Common::GaRandomBool* GaGlobalRandomBoolGenerator;

#elif defined(GAL_PLATFORM_NIX)

extern Common::GaRandomInteger* GaGlobalRandomIntegerGenerator;
extern Common::GaRandomFloat* GaGlobalRandomFloatGenerator;
extern Common::GaRandomDouble* GaGlobalRandomDoubleGenerator;
extern Common::GaRandomBool* GaGlobalRandomBoolGenerator;

#endif

#endif

⌨️ 快捷键说明

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