Internal representation of values: module venture.lite.value¶
Venture values.
The design currently lives in doc/type-system.md
-
class
venture.lite.value.
SPRef
(makerNode)¶ Bases:
venture.lite.value.VentureValue
-
asStackDict
(trace=None)¶
-
static
fromStackDict
()¶
-
makerNode
¶
-
-
class
venture.lite.value.
VentureArray
(array)¶ Bases:
venture.lite.value.VentureValue
Venture arrays are heterogeneous, with O(1) access and O(n) copy.
-
array
¶
-
asPythonList
(elt_type=None)¶
-
asStackDict
(trace=None)¶
-
compareSameType
(other)¶
-
contains
(obj)¶
-
dot
(other)¶
-
expressionFor
()¶
-
static
fromStackDict
()¶
-
getArray
(elt_type=None)¶
-
isValidCompoundForm
()¶
-
lookup
(index)¶
-
lookup_grad
(index, direction)¶
-
map_real
(f)¶
-
size
()¶
-
take
(ind)¶
-
-
class
venture.lite.value.
VentureArrayUnboxed
(array, elt_type)¶ Bases:
venture.lite.value.VentureValue
Venture arrays of unboxed objects are homogeneous, with O(1) access and O(n) copy.
-
array
¶
-
asPythonList
(elt_type=None)¶
-
asStackDict
(_trace=None)¶
-
compareSameType
(other)¶
-
contains
(obj)¶
-
dot
(other)¶
-
elt_type
¶
-
static
fromStackDict
()¶
-
getArray
(elt_type=None)¶
-
isValidCompoundForm
()¶
-
lookup
(index)¶
-
lookup_grad
(index, direction)¶
-
map_real
(f)¶
-
size
()¶
-
take
(ind)¶
-
-
class
venture.lite.value.
VentureAtom
(atom)¶ Bases:
venture.lite.value.VentureValue
-
asStackDict
(_trace=None)¶
-
atom
¶
-
compareSameType
(other)¶
-
expressionFor
()¶
-
static
fromStackDict
()¶
-
getAtom
()¶
-
-
class
venture.lite.value.
VentureBool
(boolean)¶ Bases:
venture.lite.value.VentureValue
-
asStackDict
(_trace=None)¶
-
boolean
¶
-
compareSameType
(other)¶
-
expressionFor
()¶
-
static
fromStackDict
()¶
-
getBool
()¶
-
-
class
venture.lite.value.
VentureDict
(d)¶ Bases:
venture.lite.value.VentureValue
-
asStackDict
(_trace=None)¶
-
contains
(key)¶
-
dict
¶
-
equalSameType
(other)¶
-
expressionFor
()¶
-
static
fromStackDict
()¶
-
getDict
()¶
-
lookup
(key)¶
-
size
()¶
-
-
class
venture.lite.value.
VentureForeignBlob
(datum)¶ Bases:
venture.lite.value.VentureValue
-
asStackDict
(_trace=None)¶
-
datum
¶
-
equalSameType
(other)¶
-
static
fromStackDict
()¶
-
getForeignBlob
()¶
-
-
class
venture.lite.value.
VentureInteger
(number)¶ Bases:
venture.lite.value.VentureValue
-
asStackDict
(_trace=None)¶
-
compareSameType
(other)¶
-
expressionFor
()¶
-
static
fromStackDict
()¶
-
getBool
()¶
-
getInteger
()¶
-
getNumber
()¶
-
number
¶
-
-
class
venture.lite.value.
VentureMatrix
(matrix)¶ Bases:
venture.lite.value.VentureValue
-
asStackDict
(_trace=None)¶
-
compareSameType
(other)¶
-
dot
(other)¶
-
expressionFor
()¶
-
static
fromStackDict
()¶
-
getMatrix
()¶
-
getSymmetricMatrix
()¶
-
lookup
(index)¶
-
map_real
(f)¶
-
matrix
¶
-
-
class
venture.lite.value.
VentureNil
¶ Bases:
venture.lite.value.VentureValue
-
asPossiblyImproperList
()¶
-
asPythonList
(_elt_type=None)¶
-
asStackDict
(_trace=None)¶
-
compareSameType
(_)¶
-
contains
(_obj)¶
-
expressionFor
()¶
-
static
fromStackDict
()¶
-
getArray
(elt_type=None)¶
-
isValidCompoundForm
()¶
-
lookup
(index)¶
-
size
()¶
-
take
(ct)¶
-
-
class
venture.lite.value.
VentureNumber
(number)¶ Bases:
venture.lite.value.VentureValue
-
asStackDict
(_trace=None)¶
-
compareSameType
(other)¶
-
dot
(other)¶
-
expressionFor
()¶
-
static
fromStackDict
()¶
-
getBool
()¶
-
getInteger
()¶
-
getNumber
()¶
-
map_real
(f)¶
-
number
¶
-
real_lenses
()¶
-
-
class
venture.lite.value.
VenturePair
¶ Bases:
venture.lite.value.VentureValue
-
asPossiblyImproperList
()¶
-
asPythonList
(elt_type=None)¶
-
asStackDict
(trace=None)¶
-
compareSameType
(other)¶
-
contains
(obj)¶
-
dot
(other)¶
-
equalSameType
(other)¶
-
expressionFor
()¶
-
first
¶
-
static
fromStackDict
()¶
-
getArray
(elt_type=None)¶
-
getPair
()¶
-
isValidCompoundForm
()¶
-
lookup
(index)¶
-
lookup_grad
(index, direction)¶
-
map_real
(f)¶
-
rest
¶
-
size
()¶
-
take
(ind)¶
-
-
class
venture.lite.value.
VentureSimplex
(simplex)¶ Bases:
venture.lite.value.VentureValue
Simplexes are homogeneous unboxed arrays of probabilities. They are also supposed to sum to 1, but we are not checking that.
-
asPythonList
(elt_type=None)¶
-
asStackDict
(_trace=None)¶
-
compareSameType
(other)¶
-
contains
(obj)¶
-
expressionFor
()¶
-
static
fromStackDict
()¶
-
getArray
(elt_type=None)¶
-
getSimplex
()¶
-
lookup
(index)¶
-
map_real
(f)¶
-
simplex
¶
-
size
()¶
-
take
(ind)¶
-
-
class
venture.lite.value.
VentureString
(strng)¶ Bases:
venture.lite.value.VentureValue
-
asStackDict
(_trace=None)¶
-
compareSameType
(other)¶
-
expressionFor
()¶
-
static
fromStackDict
()¶
-
getString
()¶
-
getSymbol
()¶
-
strng
¶
-
-
class
venture.lite.value.
VentureSymbol
(symbol)¶ Bases:
venture.lite.value.VentureValue
-
asStackDict
(_trace=None)¶
-
compareSameType
(other)¶
-
expressionFor
()¶
-
static
fromStackDict
()¶
-
getSymbol
()¶
-
symbol
¶
-
-
class
venture.lite.value.
VentureSymmetricMatrix
(matrix)¶ Bases:
venture.lite.value.VentureMatrix
-
asStackDict
(_trace=None)¶
-
expressionFor
()¶
-
static
fromStackDict
()¶
-
map_real
(f)¶
-
matrix
¶
-
-
class
venture.lite.value.
VentureValue
¶ Bases:
object
Base class of all Venture values.
-
asPythonList
(_elt_type=None)¶
-
asStackDict
(_trace=None)¶
-
compare
(other)¶
-
compareSameType
(_)¶
-
contains
(_)¶
-
equal
(other)¶
-
equalSameType
(other)¶
-
expressionFor
()¶
-
static
fromStackDict
()¶
-
getArray
(_elt_type=None)¶
-
getAtom
()¶
-
getBool
()¶
-
getDict
()¶
-
getEnvironment
()¶
-
getForeignBlob
()¶
-
getInteger
()¶
-
getMatrix
()¶
-
getNumber
()¶
-
getPair
()¶
-
getSP
()¶
-
getSimplex
()¶
-
getString
()¶
-
getSymbol
()¶
-
getSymmetricMatrix
()¶
-
isValidCompoundForm
()¶
-
length
()¶
-
lookup
(_)¶
-
lookup_grad
(_index, _direction)¶
-
map_real
(_f)¶
-
take
(_ct)¶
-
-
venture.lite.value.
lexicographicBoxedCompare
(thing, other)¶
-
venture.lite.value.
lexicographicMatrixCompare
(thing, other)¶
-
venture.lite.value.
lexicographicUnboxedCompare
(thing, other)¶
-
venture.lite.value.
matrixIsSymmetric
(matrix)¶
-
venture.lite.value.
pythonListToImproperVentureList
(tail, *l)¶
-
venture.lite.value.
pythonListToVentureList
(l)¶
-
venture.lite.value.
registerVentureType
(t, name=None)¶
-
venture.lite.value.
sequenceHash
(seq)¶
-
venture.lite.value.
stupidCompare
(thing, other)¶
-
venture.lite.value.
vv_dot_product
(v1, v2)¶ Dot product of venture values taking into account that either may be a symbolic zero. TODO: Introduce the VentureZero value to uniformize this.