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(thing)
class venture.lite.value.VentureArray(array)

Bases: venture.lite.value.VentureValue

Venture arrays are heterogeneous, with O(1) access and O(n) copy.

asPythonList(elt_type=None)
asStackDict(trace=None)
compareSameType(other)
contains(obj)
dot(other)
expressionFor()
static fromStackDict(thing)
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.

asPythonList(elt_type=None)
asStackDict(_trace=None)
compareSameType(other)
contains(obj)
dot(other)
static fromStackDict(thing)
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)
compareSameType(other)
expressionFor()
static fromStackDict(thing)
getAtom()
getBool()
getNumber()
class venture.lite.value.VentureBool(boolean)

Bases: venture.lite.value.VentureValue

asStackDict(_trace=None)
compareSameType(other)
expressionFor()
static fromStackDict(thing)
getBool()
getInteger()
getNumber()
class venture.lite.value.VentureDict(d)

Bases: venture.lite.value.VentureValue

asStackDict(_trace=None)
contains(key)
equalSameType(other)
expressionFor()
static fromStackDict(thing)
getDict()
lookup(key)
size()
class venture.lite.value.VentureForeignBlob(datum)

Bases: venture.lite.value.VentureValue

asStackDict(_trace=None)
static fromStackDict(thing)
getForeignBlob()
class venture.lite.value.VentureInteger(number)

Bases: venture.lite.value.VentureValue

asStackDict(_trace=None)
compareSameType(other)
expressionFor()
static fromStackDict(thing)
getBool()
getInteger()
getNumber()
class venture.lite.value.VentureMatrix(matrix)

Bases: venture.lite.value.VentureValue

asStackDict(_trace=None)
compareSameType(other)
dot(other)
expressionFor()
static fromStackDict(thing)
getMatrix()
getSymmetricMatrix()
lookup(index)
map_real(f)
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(thing)
getBool()
getInteger()
getNumber()
getProbability()
map_real(f)
real_lenses()
class venture.lite.value.VenturePair((first, rest))

Bases: venture.lite.value.VentureValue

asPossiblyImproperList()
asPythonList(elt_type=None)
asStackDict(trace=None)
compareSameType(other)
contains(obj)
dot(other)
expressionFor()
static fromStackDict(thing)
getArray(elt_type=None)
getPair()
isValidCompoundForm()
lookup(index)
lookup_grad(index, direction)
map_real(f)
size()
take(ind)
class venture.lite.value.VentureProbability(number)

Bases: venture.lite.value.VentureValue

asStackDict(_trace=None)
compareSameType(other)
expressionFor()
static fromStackDict(thing)
getNumber()
getProbability()
map_real(f)
real_lenses()
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.

asStackDict(_trace=None)
compareSameType(other)
contains(obj)
expressionFor()
static fromStackDict(thing)
getArray(elt_type=None)
getSimplex()
lookup(index)
map_real(f)
size()
take(ind)
class venture.lite.value.VentureString(strng)

Bases: venture.lite.value.VentureValue

asStackDict(_trace=None)
compareSameType(other)
expressionFor()
static fromStackDict(thing)
getString()
getSymbol()
class venture.lite.value.VentureSymbol(symbol)

Bases: venture.lite.value.VentureValue

asStackDict(_trace=None)
compareSameType(other)
expressionFor()
static fromStackDict(thing)
getSymbol()
class venture.lite.value.VentureSymmetricMatrix(matrix)

Bases: venture.lite.value.VentureMatrix

asStackDict(_trace=None)
expressionFor()
static fromStackDict(thing)
map_real(f)
class venture.lite.value.VentureValue

Bases: object

Base class of all Venture values.

asStackDict(_trace=None)
compare(other)
compareSameType(_)
contains(_)
equal(other)
equalSameType(other)
expressionFor()
static fromStackDict(thing)
getArray(_elt_type=None)
getAtom()
getBool()
getDict()
getEnvironment()
getForeignBlob()
getInteger()
getMatrix()
getNumber()
getPair()
getProbability()
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.

Previous topic

Type annotations for foreign procedures: module venture.lite.types

This Page