Ada 编程/库/Ada.Numerics.Discrete Random
外观
此语言特性从 Ada 95 开始可用。
Ada.Numerics.Discrete_Random 是 预定义语言环境 中的一个单元,自 Ada 95 开始。
-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <[email protected]> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------generic
type
Result_Subtypeis
(<>);package
Ada.Numerics.Discrete_Randomis
-- Basic facilitiestype
Generatoris
limited
private
;function
Random (Gen : Generator)return
Result_Subtype;procedure
Reset (Gen :in
Generator; Initiator :in
Integer);procedure
Reset (Gen :in
Generator); -- Advanced facilitiestype
Stateis
private
;procedure
Save (Gen :in
Generator; To_State :out
State);procedure
Reset (Gen :in
Generator; From_State :in
State); Max_Image_Width :constant
:= implementation_defined;function
Image (Of_State : State)return
String;function
Value (Coded_State : String)return
State;private
pragma
Import (Ada, State);pragma
Import (Ada, Generator);end
Ada.Numerics.Discrete_Random;
外部示例
[编辑源代码]- 搜索 示例 的
Ada.Numerics.Discrete_Random
在: Rosetta Code, GitHub (gists), 任何 Alire 包 或 此维基教科书. - 搜索与
Ada.Numerics.Discrete_Random
相关的 帖子 在: Stack Overflow, comp.lang.ada 或 任何与 Ada 相关的页面.
FSF GNAT
- 规范: a-nudira.ads
- 主体: a-nudira.adb
drake