time-to-botec

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

repl.txt (1682B)


      1 
      2 {{alias}}( value )
      3     Tests if a value is an array-like object containing only probabilities.
      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 an array-like object containing only
     16         probabilities.
     17 
     18     Examples
     19     --------
     20     > var bool = {{alias}}( [ 0.5, new Number(0.8) ] )
     21     true
     22     > bool = {{alias}}( [ 0.8, 1.2 ] )
     23     false
     24     > bool = {{alias}}( [ 0.8, '0.2' ] )
     25     false
     26 
     27 
     28 {{alias}}.primitives( value )
     29     Tests if a value is an array-like object containing only primitive
     30     probabilities.
     31 
     32     Parameters
     33     ----------
     34     value: any
     35         Value to test.
     36 
     37     Returns
     38     -------
     39     bool: boolean
     40         Boolean indicating whether value is an array-like object containing only
     41         primitive probabilities.
     42 
     43     Examples
     44     --------
     45     > var bool = {{alias}}.primitives( [ 1.0, 0.0, 0.5 ] )
     46     true
     47     > bool = {{alias}}.primitives( [ 0.3, new Number(0.4) ] )
     48     false
     49 
     50 
     51 {{alias}}.objects( value )
     52     Tests if a value is an array-like object containing only number objects
     53     having probability values.
     54 
     55     Parameters
     56     ----------
     57     value: any
     58         Value to test.
     59 
     60     Returns
     61     -------
     62     bool: boolean
     63         Boolean indicating whether value is an array-like object containing only
     64         number objects having probability values.
     65 
     66     Examples
     67     --------
     68     > var bool = {{alias}}.objects( [ new Number(0.7), new Number(1.0) ] )
     69     true
     70     > bool = {{alias}}.objects( [ 1.0, 0.0, new Number(0.7) ] )
     71     false
     72 
     73     See Also
     74     --------
     75