[−][src]Struct aces::CEStructure
A single c-e structure.
Internally, instances of this type own structural information (the
cause and effect polynomials), semantic properties (node
capacities for the carrier), the intermediate content
representation from which a c-e structure originated (optionally),
and some auxiliary recomputable data. Other properties are
available indirectly: CEStructure
instance owns a
ContextHandle
which resolves to a shared Context
object.
Methods
impl CEStructure
[src]
pub fn new(ctx: &ContextHandle) -> Self
[src]
Creates an empty c-e structure in a Context
given by a
ContextHandle
.
pub fn set_encoding(&mut self, encoding: Encoding)
[src]
pub fn add_causes<'a, I>(
&mut self,
node_id: NodeID,
poly_ids: I
) -> Result<(), AcesError> where
I: IntoIterator + 'a,
I::Item: IntoIterator<Item = &'a NodeID>,
[src]
&mut self,
node_id: NodeID,
poly_ids: I
) -> Result<(), AcesError> where
I: IntoIterator + 'a,
I::Item: IntoIterator<Item = &'a NodeID>,
Constructs new Polynomial
from a sequence of sequences of
NodeID
s and adds it to causes of a node of this
CEStructure
.
This method is incremental: new polynomial is added to old
polynomial that is already attached to the node_id
as node's
causes (there is always some polynomial attached, if not
explicitly, then implicitly, as the default θ).
pub fn add_effects<'a, I>(
&mut self,
node_id: NodeID,
poly_ids: I
) -> Result<(), AcesError> where
I: IntoIterator + 'a,
I::Item: IntoIterator<Item = &'a NodeID>,
[src]
&mut self,
node_id: NodeID,
poly_ids: I
) -> Result<(), AcesError> where
I: IntoIterator + 'a,
I::Item: IntoIterator<Item = &'a NodeID>,
Constructs new Polynomial
from a sequence of sequences of
NodeID
s and adds it to effects of a node of this
CEStructure
.
This method is incremental: new polynomial is added to old
polynomial that is already attached to the node_id
as node's
effects (there is always some polynomial attached, if not
explicitly, then implicitly, as the default θ).
pub fn from_content(
ctx: &ContextHandle,
content: Box<dyn Content>
) -> Result<Self, Box<dyn Error>>
[src]
ctx: &ContextHandle,
content: Box<dyn Content>
) -> Result<Self, Box<dyn Error>>
pub fn from_str<S: AsRef<str>>(
ctx: &ContextHandle,
script: S
) -> Result<Self, Box<dyn Error>>
[src]
ctx: &ContextHandle,
script: S
) -> Result<Self, Box<dyn Error>>
Creates a new c-e structure from a textual description and in
a Context
given by a ContextHandle
.
pub fn from_file<P: AsRef<Path>>(
ctx: &ContextHandle,
path: P
) -> Result<Self, Box<dyn Error>>
[src]
ctx: &ContextHandle,
path: P
) -> Result<Self, Box<dyn Error>>
Creates a new c-e structure from a script file to be found
along the path
and in a Context
given by a
ContextHandle
.
pub fn get_context(&self) -> &ContextHandle
[src]
pub fn get_name(&self) -> Option<&str>
[src]
pub fn is_coherent(&self) -> bool
[src]
Returns link coherence status indicating whether this object represents a proper c-e structure.
C-e structure is coherent iff it has no thin links, where a
link is thin iff it occurs either in causes or in effects, but
not in both. Internally, there is a thin links counter
associated with each CEStructure
object. This counter is
updated whenever a polynomial is added to the structure.
pub fn get_port_link_formula(&self) -> Result<Formula, Box<dyn Error>>
[src]
pub fn get_fork_join_formula(&self) -> Result<Formula, Box<dyn Error>>
[src]
pub fn solve(&mut self, minimal_mode: bool) -> Result<(), Box<dyn Error>>
[src]
pub fn get_firing_components(&self) -> Option<&[FiringComponent]>
[src]
Trait Implementations
Auto Trait Implementations
impl !Send for CEStructure
impl Unpin for CEStructure
impl !Sync for CEStructure
impl !UnwindSafe for CEStructure
impl !RefUnwindSafe for CEStructure
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<Reference, Outer, OuterFieldType, Inner> HasPart<Nested<Outer, Inner>> for Reference where
Inner: Part,
Outer: Part<PartType = Field<OuterFieldType>>,
OuterFieldType: HasPart<Inner, RawTarget = OuterFieldType> + PartialRefTarget + ?Sized,
Reference: HasPart<Outer> + ?Sized,
Inner: Part,
Outer: Part<PartType = Field<OuterFieldType>>,
OuterFieldType: HasPart<Inner, RawTarget = OuterFieldType> + PartialRefTarget + ?Sized,
Reference: HasPart<Outer> + ?Sized,
unsafe fn part_ptr(
ptr: *const <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::Ptr
ptr: *const <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::Ptr
unsafe fn part_ptr_mut(
ptr: *mut <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::PtrMut
ptr: *mut <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::PtrMut