time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

repl.txt (1504B)


      1 
      2 {{alias}}( value )
      3     Tests if a value is a probability.
      4 
      5     A probability is defined as a numeric value on the interval [0,1].
      6 
      7     Parameters
      8     ----------
      9     value: any
     10         Value to test.
     11 
     12     Returns
     13     -------
     14     bool: boolean
     15         Boolean indicating whether value is a probability.
     16 
     17     Examples
     18     --------
     19     > var bool = {{alias}}( 0.5 )
     20     true
     21     > bool = {{alias}}( new Number( 0.5 ) )
     22     true
     23     > bool = {{alias}}( 3.14 )
     24     false
     25     > bool = {{alias}}( -5.0 )
     26     false
     27     > bool = {{alias}}( null )
     28     false
     29 
     30 
     31 {{alias}}.isPrimitive( value )
     32     Tests if a value is a number primitive which is a probability.
     33 
     34     Parameters
     35     ----------
     36     value: any
     37         Value to test.
     38 
     39     Returns
     40     -------
     41     bool: boolean
     42         Boolean indicating whether value is a number primitive which is a
     43         probability.
     44 
     45     Examples
     46     --------
     47     > var bool = {{alias}}.isPrimitive( 0.3 )
     48     true
     49     > bool = {{alias}}.isPrimitive( new Number( 0.3 ) )
     50     false
     51 
     52 
     53 {{alias}}.isObject( value )
     54     Tests if a value is a number object having a value which is a probability.
     55 
     56     Parameters
     57     ----------
     58     value: any
     59         Value to test.
     60 
     61     Returns
     62     -------
     63     bool: boolean
     64         Boolean indicating whether value is a number object having a value which
     65         is a probability.
     66 
     67     Examples
     68     --------
     69     > var bool = {{alias}}.isObject( 0.77 )
     70     false
     71     > bool = {{alias}}.isObject( new Number( 0.77 ) )
     72     true
     73 
     74 
     75     See Also
     76     --------
     77