Lazy

class LazyCell(prototype)[source]

This is a proxy for accessing (partially enumerated) sets of candidate cells. LazyCells are constrained to be within the value of their prototype

Question:
How to handle dynamic properties?
Answer:
When we update_intension(), the members that are saved will be filtered against the criteria of the prototype.
size()[source]

Size of LazyCell: the size of the intension plus accounting for excluded and included additions.

The exclusions are assumed to be part of the set. The inclusions are assumed to NOT be part of the intension.

Returns:int – size of LazyCell
update()[source]

Updates intension and then adds or includes extension

update_intension()[source]

Subclass specific method for generating self.members The methods responsibilities are:

  • Defining self.members: mapping hash(m) -> m
  • Defining self._size_full_intension
is_entailed_by(other)[source]

Means merging other with self does not produce any new information.

Returns:boolean
is_equal(other)[source]
The objects must be the same
  • Same members (if enumerated)
  • Or same structure (if not enumerated)

If the merge does not produce any new information (or contradiction) then these are equal.

Returns:boolean
get_instances()[source]

Returns the members of the LazyDict in sorted order, as an iterator

Returns:iter
is_contradiction(other)[source]

Is contradiction means that a merge of the new information with the LazyCell will result in 0 members and is over constrained.

Returns:boolean
merge(other)[source]

Other is some description of a parameter that is responsible for generating the instances

Returns:boolean

This Page