SheafSystem  0.0.0.0
fields::property_disc_iterator_4_2 Class Reference

A property discretization iterator for a field with uniform coordinates section and a property section with the evaluation strictly above the discretization. More...

#include <property_disc_iterator_4_2.h>

Inheritance diagram for fields::property_disc_iterator_4_2:
fields::property_disc_iterator sheaf::depth_first_iterator sheaf::any

PROPERTY_DISC_ITERATOR_4_2 FACET

 property_disc_iterator_4_2 (const field_vd &xfield)
 Creates an iterator over the schema of xfield. More...
 
 property_disc_iterator_4_2 (const section_space_schema_member &xcoordinate_schema, const section_space_schema_member &xproperty_schema)
 Creates an iterator anchored at xcoordinate_schema.base_space(). More...
 
 ~property_disc_iterator_4_2 ()
 Destructor. More...
 

PROPERTY_DISC_ITERATOR FACET

virtual void get_prop_disc_values (const sec_vd &xsec)
 The gets the values of xsec at the property discretization points. More...
 

DEPTH_FIRST_ITERATOR FACET

virtual void next (bool xtruncate)
 Makes this the next member of the subset. If xtruncate, new this is not less than old this, i.e. the depth-first descent is truncated and the cover of this is not visited. More...
 
virtual void reset (bool xreset_markers=true)
 Restarts the iteration. More...
 

ANY FACET

virtual bool is_ancestor_of (const any *xother) const
 True if other conforms to this. More...
 
virtual property_disc_iterator_4_2clone () const
 Make a new instance of the same type as this. More...
 
bool invariant () const
 The class invariant. More...
 

Additional Inherited Members

- Public Types inherited from sheaf::depth_first_iterator
enum  order_type {
  PREORDER, POSTORDER, LINKORDER, BIORDER,
  TRIORDER, NOT_AN_ORDER
}
 The types of order in which the iterator will visit the members of the poset. Determines which actions are exported to the client. More...
 
enum  action_type { PREVISIT_ACTION, LINK_ACTION, POSTVISIT_ACTION, NOT_AN_ACTION }
 The types of action a client should take when the iterator returns control to the client. More...
 
- Public Member Functions inherited from fields::property_disc_iterator
 ~property_disc_iterator ()
 Destructor. More...
 
const section_space_schema_membercoordinates_schema () const
 The coordinates field schema member which is being iterated over. More...
 
const section_space_schema_memberproperty_schema () const
 The property field schema member which is being iterated over. More...
 
const base_space_posetbase_space () const
 The base space shared by both schema. More...
 
const subposetcoordinates_evaluation () const
 The evaluation subposet for the coordinates. More...
 
const subposetproperty_evaluation () const
 The evaluation subposet for the property. More...
 
int db () const
 The dimension of the current evaluation member. More...
 
pod_index_type type_id () const
 The type id of the current member. More...
 
std::string type_name () const
 The type name of the current member. More...
 
section_evaluatorcoordinate_evaluator () const
 The coordinate field evaluator associated with the current evaluation member. More...
 
section_evaluatorproperty_evaluator () const
 The property field evaluator associated with the current evaluation member. More...
 
const block< discretization_context > & coordinate_discretization_members () const
 The coordinate discretization members in the downset of the current evaluation member. More...
 
const block< discretization_context > & property_discretization_members () const
 The property discretization members in the downset of the current evaluation member. More...
 
virtual void force_is_done ()
 Force the iterator to be done. More...
 
- Public Member Functions inherited from sheaf::depth_first_iterator
depth_first_iteratoroperator= (const depth_first_iterator &xother)
 Assignment operator. More...
 
virtual ~depth_first_iterator ()
 Destructor. More...
 
bool invariant () const
 The class invariant. More...
 
order_type order () const
 The order of the iteration. Determines which actions are exported to the client. More...
 
virtual bool is_initialized () const
 True if this has been initialized for iteration with respect to a specific anchor. More...
 
virtual abstract_poset_memberanchor ()
 The poset member whose downset is being iterated over; the top member of the domain of iteration (mutable version). More...
 
virtual const abstract_poset_memberanchor () const
 The poset member whose downset is being iterated over; the top member of the domain of iteration (const version). More...
 
virtual bool anchor_is_ancestor_of (const abstract_poset_member &xmbr) const
 True if xmbr conforms to the type of anchor of this. More...
 
bool descending () const
 True if iterating over down set of anchor. More...
 
bool strict () const
 True if iterating over xstrict up/down set of anchor. More...
 
subposetfilter ()
 The subposet which is the filter; Defines what is passed, not what is blocked. More...
 
bool is_done () const
 True if iteration finished. More...
 
void next ()
 Makes this the next member of the subset. More...
 
void truncate ()
 Makes this the next member of the subset which is not less than old this, i.e. the depth-first descent is truncated and the cover of this is not visited. More...
 
int ct (bool xreset=false)
 The number of members of the iteration set, from the current member to the end, inclusive. If xreset, reset before computing the count. More...
 
bool has_visited (pod_index_type xhub_id) const
 True if this has already visited member with hub id xhub_id. More...
 
bool has_visited (const scoped_index &xid) const
 True if this has already visited member with id xid. More...
 
bool has_visited (const abstract_poset_member *xmbr) const
 True if this has already visited member xmbr. More...
 
void put_has_visited (pod_index_type xhub_id, bool xvalue)
 Set the visited marker for hub id xhub_id to xvalue. Intended for use reseting iterator without having to reset entire collection of markers. More...
 
void put_has_visited (const scoped_index &xid, bool xvalue)
 Set the visisted marker for id xid to xvalue. Intended for use reseting iterator without having to reset entire collection of markers. More...
 
bool visit_once () const
 True if traversal should only visit a member once; that is, it should not revisit members it has already visited. More...
 
void put_visit_once (bool xvisit_once)
 Set visit_once() to xvisit_once. More...
 
bool is_maximal () const
 True if the current member has no greater member within the subposet visited by this iterator. More...
 
const scoped_indexgreater_index () const
 The index of the greater member of the current link. More...
 
const scoped_indexlesser_index () const
 The index of the lesser member of the current link. More...
 
action_type action () const
 The type of action the client should take when the iterator returns control to the client. More...
 
void erase_cover ()
 Schedules the lesser member entry in the cover of the greater member of the current link for deletion on the next call to next(). Warning: this function can change the state of the the cover relation graph in unpredictable ways. Use only if you know what you are doing. More...
 
const scoped_indexindex () const
 The index of the current member of the iteration. More...
 
size_t depth () const
 The length of the path from anchor() to the current member. More...
 
- Public Member Functions inherited from sheaf::any
bool is_same_type (const any *other) const
 True if other is the same type as this. More...
 
virtual ~any ()
 Destructor. More...
 
bool invariant_check () const
 True if invariant checking is enabled. More...
 
void enable_invariant_check () const
 Enable invariant checking. More...
 
void disable_invariant_check () const
 Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More...
 
int disable_invariance_check_request_depth () const
 Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More...
 
- Static Public Member Functions inherited from fields::property_disc_iterator
static property_disc_iteratornew_property_disc_iterator (const section_space_schema_member &xcoords_schema, const section_space_schema_member &xprop_schema)
 Creates an iterator appropriate for xcoords and xprop. More...
 
- Static Public Attributes inherited from sheaf::depth_first_iterator
static const char * NULL_FILTER = ""
 Placeholder for null filter. More...
 
- Protected Types inherited from sheaf::depth_first_iterator
enum  iterator_state {
  FIRST, INIT_COVER_ITERATOR, TEST_HAS_VISITED, INC_COVER_ITERATOR,
  ERASE_COVER_ITERATOR, DESCEND, TEST_PATH_TAIL, ASCEND,
  EXECUTE_PREVISIT_ACTION, EXECUTE_LINK_ACTION, EXECUTE_POSTVISIT_ACTION, FINISH,
  NOT_A_STATE
}
 The states for the finite state machine that controls iteration. More...
 
enum  iterator_token { PASS, FAIL }
 The input tokens for the finite state machine. More...
 
typedef const iterator_state(* transition_fcn_type)[FAIL+1]
 
- Protected Member Functions inherited from fields::property_disc_iterator
 property_disc_iterator ()
 Default constructor. More...
 
 property_disc_iterator (const property_disc_iterator &xother)
 Copy constructor; disabled. More...
 
void initialize_iteration (const field_vd &xfield, order_type xorder)
 Initializes this for iteration of type xorder over the schema of xfield. More...
 
void initialize_iteration (const section_space_schema_member &xcoordinates_schema, const section_space_schema_member &xproperty_schema, order_type xorder)
 Initializes this for iteration of type xorder over xcoordinates_schema and xproperty_schema. More...
 
- Protected Member Functions inherited from sheaf::depth_first_iterator
 depth_first_iterator ()
 Default constructor; creates an unattached iterator,. More...
 
 depth_first_iterator (const depth_first_iterator &xother)
 Copy constructor. More...
 
void first ()
 Moves this to the first member of the iteration. More...
 
void mark_visited (abstract_poset_member *xmbr)
 Mark xmbr as visited. Warning: this function can change the state of the iteration in unpredictable ways. Use only if you know what you are doing. More...
 
void mark_not_visited (abstract_poset_member *xmbr)
 Mark xmbr as not visited. Warning: this function can change the state of the iteration in unpredictable ways. Use only if you know what you are doing. More...
 
virtual void attach_item ()
 Attaches the item handle to the current index. Empty in this class; intended for redefinition in descendants. More...
 
virtual void detach_item ()
 Detaches the item handle to the current index. Empty in this class; intended for redefinition in descendants. More...
 
void initialize_order (order_type xorder)
 Initializes _order and _transition_fcn. More...
 
void initialize_traversal (const abstract_poset_member &xanchor)
 Initializes the anchor, has_visited markers and filter. More...
 
void initialize_traversal (pod_index_type xanchor_hub_id)
 Initializes the anchor, has_visited markers and filter. More...
 
void initialize_traversal (const scoped_index &xanchor_id)
 Initializes the anchor, has_visited markers and filter. More...
 
void initialize_anchor (const abstract_poset_member &xanchor)
 Initializes the anchor. More...
 
virtual void initialize_has_visited (const abstract_poset_member &xanchor)
 Initializes the has_visited markers. More...
 
zn_to_boolhas_visited () const
 The marker bit vector. /. More...
 
void put_has_visited (zn_to_bool *xhas_visited)
 Sets _has_visited to xhas_visited. /. More...
 
bool filter (pod_index_type xhub_id) const
 The value of the filter at hub id xhub_id. More...
 
bool filter (const scoped_index &xid) const
 The value of the filter at id xid. More...
 
void initialize_filter ()
 Initializes the filter subposet from the client filter. More...
 
void initialize_filter (const subposet &xfilter)
 Initializes the client filter to xfilter then initializes the filter from the client filter. More...
 
void initialize_filter (pod_index_type xfilter_hub_id)
 Initializes the client filter to the subposet with hub id xfilter_hub_id then initializes the filter from the client filter. More...
 
void initialize_filter (const scoped_index &xfilter_id)
 Initializes the client filter to the subposet with id xfilter_id then initializes the filter from the client filter. More...
 
void initialize_filter (const std::string &xfilter_name)
 Initializes the client filter to the subposet with name xfilter_name then initializes the filter from the client filter. More...
 
void release_cover_id_space_iterators ()
 Release the cover iterators back to the pool of iterators. More...
 
- Protected Member Functions inherited from sheaf::any
 any ()
 default constructor More...
 
- Protected Attributes inherited from fields::property_disc_iterator
section_iteration_state _coord_state
 Descriptor for coordinate section iteration. More...
 
section_iteration_state _prop_state
 Descriptor for property section iteration. More...
 
depth_flags_type _at
 True if current iteration is a member of the subposet associated with the flag. More...
 
depth_flags_type _above
 True if current iteration is above the subposet associated with the flag. More...
 
- Protected Attributes inherited from sheaf::depth_first_iterator
abstract_poset_member_anchor
 The top member of the down set being iterated over. More...
 
action_type _action
 The type of action the client should take; the state of the iterator. More...
 
scoped_index _index
 The index of the lesser end of the current link; the current item in the iteration. More...
 
scoped_index _greater_index
 The index of the greater member of the current link. More...
 
scoped_index _lesser_index
 The index of the lesser member of the current link. More...
 
subposet _client_filter
 The filter specified by the client. More...
 
bool _new_filter
 True if this allocated a new filter;. More...
 
bool _descending
 True if iterating over the up/down set of anchor. More...
 
bool _strict
 True if iterating over the strict up/down set of anchor. More...
 
order_type _order
 The order of the iteration. More...
 
const iterator_state(* _transition_fcn )[FAIL+1]
 The current state transition function for the iterator finite state machine. Points to one of the predefined transition functions. More...
 
iterator_state _state
 The current state of iteration. More...
 
index_space_iterator_path_head_lc
 The lower cover iterator for the head of the path to the current member of the iteration. More...
 
index_space_iterator_path_head
 The head of the path to the current member of the iteration lesser_index() == this->index() == **_path_head == lesser member of current link. More...
 
std::stack< index_space_iterator * > _path_tail
 The tail of the path to the current member of the iteration greater_index() == **(_path_tail.top()) == greater member of current link. More...
 
std::stack< pod_index_type_filtered_path_tail
 The tail of the filtered path to the current member of the iteration. Contains only members which pass the filter; equivalent to the path in the subposet selected by the filter. More...
 
bool _visit_once
 True if traversal should only visit a member once; that is, it should not revisit members it has already visited. More...
 
- Static Protected Attributes inherited from sheaf::depth_first_iterator
static const char * iterator_state_names [NOT_A_STATE+1]
 The names of the iterator states, convenient for debugging. More...
 
static const iterator_state PREORDER_TRANSITION_FCN [NOT_A_STATE-1][FAIL+1]
 The predefined transition function for postorder iteration. Defines the next state for each combination of state and input token, except for state FINISH, which is always a terminal state. More...
 
static const iterator_state POSTORDER_TRANSITION_FCN [NOT_A_STATE-1][FAIL+1]
 The predefined transition function for postorder iteration. Defines the next state for each combination of state and input token, except for state FINISH, which is always a terminal state. More...
 
static const iterator_state LINKORDER_TRANSITION_FCN [NOT_A_STATE-1][FAIL+1]
 The predefined transition function for linkorder iteration. Defines the next state for each combination of state and input token, except for state FINISH, which is always a terminal state. More...
 
static const iterator_state BIORDER_TRANSITION_FCN [NOT_A_STATE-1][FAIL+1]
 The predefined transition function for biorder iteration. Defines the next state for each combination of state and input token, except for state FINISH, which is always a terminal state. More...
 
static const iterator_state TRIORDER_TRANSITION_FCN [NOT_A_STATE-1][FAIL+1]
 The predefined transition function for triorder iteration. Defines the next state for each combination of state and input token, except for state FINISH, which is always a terminal state. More...
 
static const transition_fcn_type STD_TRANSITION_FCNS [NOT_AN_ORDER+1]
 The set of predefined transition functions. More...
 

Detailed Description

A property discretization iterator for a field with uniform coordinates section and a property section with the evaluation strictly above the discretization.

Definition at line 74 of file property_disc_iterator_4_2.h.

Constructor & Destructor Documentation

◆ property_disc_iterator_4_2() [1/2]

fields::property_disc_iterator_4_2::property_disc_iterator_4_2 ( const field_vd xfield)

Creates an iterator over the schema of xfield.

Precondition
  • xfield.state_is_read_accessible()
  • xfield.base_space().schema().conforms_to(base_space_member::standard_schema_path())
  • xfield.coordinates().schema().evaluator_family_name() == "uniform"
Issue:
We can't support prop base < coord base in this implementation because we traverse from the prop down and we won't find the coord eval.
Precondition
  • xfield.property().schema().rep().eval_is_above_disc()
Postcondition
  • !strict()
  • -unexecutable( !is_done() implies this is first member )

Definition at line 54 of file property_disc_iterator_4_2.cc.

References fields::field_vd::base_space(), fiber_bundle::section_space_schema_member::base_space(), sheaf::schema_poset_member::conforms_to(), fields::field_vd::coordinates(), fiber_bundle::sec_rep_descriptor::eval_is_above_disc(), fiber_bundle::section_space_schema_member::evaluator_family_name(), sheaf::poset_component::is_same_state(), fields::field_vd::property(), fiber_bundle::section_space_schema_member::rep(), sheaf::total_poset_member::schema(), fiber_bundle::sec_rep_space_member::schema(), fields::field_vd::state_is_read_accessible(), and sheaf::poset_component::version().

◆ property_disc_iterator_4_2() [2/2]

fields::property_disc_iterator_4_2::property_disc_iterator_4_2 ( const section_space_schema_member xcoordinate_schema,
const section_space_schema_member xproperty_schema 
)

Creates an iterator anchored at xcoordinate_schema.base_space().

Precondition
  • xcoordinates_schema.state_is_read_accessible()
  • xcoordinates_schema.base_space().schema().conforms_to(base_space_member::standard_schema_path())
  • xcoordinates_schema.evaluator_family_name() == "uniform"
  • xproperty_schema.state_is_read_accessible()
Issue:
We can't support prop base < coord base in this implementation because we traverse from the prop down and we won't find the coord eval.
Precondition
  • xproperty_schema.base_space().is_same_state(&xcoordinates_schema.base_space())
  • xproperty_schema.rep().eval_is_above_disc()
Postcondition
  • !strict()
  • -unexecutable( !is_done() implies this is first member )

Definition at line 93 of file property_disc_iterator_4_2.cc.

References fiber_bundle::section_space_schema_member::base_space(), sheaf::schema_poset_member::conforms_to(), fiber_bundle::sec_rep_descriptor::eval_is_above_disc(), fiber_bundle::section_space_schema_member::evaluator_family_name(), sheaf::poset_component::is_same_state(), fiber_bundle::section_space_schema_member::rep(), sheaf::total_poset_member::schema(), sheaf::read_write_monitor_handle::state_is_read_accessible(), sheaf::poset_component::version(), and ~property_disc_iterator_4_2().

◆ ~property_disc_iterator_4_2()

fields::property_disc_iterator_4_2::~property_disc_iterator_4_2 ( )

Destructor.

Definition at line 136 of file property_disc_iterator_4_2.cc.

References get_prop_disc_values().

Referenced by property_disc_iterator_4_2().

Member Function Documentation

◆ clone()

fields::property_disc_iterator_4_2 * fields::property_disc_iterator_4_2::clone ( ) const
virtual

Make a new instance of the same type as this.

Postcondition
  • result != 0

Implements fields::property_disc_iterator.

Definition at line 381 of file property_disc_iterator_4_2.cc.

References invariant().

Referenced by is_ancestor_of().

◆ get_prop_disc_values()

void fields::property_disc_iterator_4_2::get_prop_disc_values ( const sec_vd xsec)
virtual

The gets the values of xsec at the property discretization points.

Precondition
  • xsec.state_is_read_accessible()
  • xsec.schema().is_same_state(&coordinates_schema())
Todo:
revise when ternary schema are supported.
Precondition
  • dynamic_cast<const binary_section_space_schema_member*> (&xsec.schema()) != 0
Hack:
required because discretization_context::values capacity is fixed at 3.
Precondition
  • xsec.schema().df() <= 3
Error:
we assume the unrefine operator unrefines to the prop eval, but there is no way to ensure this condition.

Implements fields::property_disc_iterator.

Definition at line 150 of file property_disc_iterator_4_2.cc.

References sheaf::auto_block< T, S >::base(), sheaf::auto_block< T, un_block_initialization_policy< T > >::ct(), sheaf::auto_block< T, S >::ct(), fiber_bundle::section_space_schema_member::df(), fiber_bundle::discretization_context::eval_id, sheaf::poset_component::is_same_state(), fiber_bundle::section_evaluator::local_coordinates(), fiber_bundle::chart_point_3d::local_coords(), fiber_bundle::discretization_context::local_id, sheaf::depth_first_iterator::next(), fiber_bundle::chart_point::put_chart_id(), fiber_bundle::sec_rep_space_member::schema(), sheaf::read_write_monitor_handle::state_is_read_accessible(), fiber_bundle::section_evaluator::value_at_coord(), and fiber_bundle::discretization_context::values.

Referenced by ~property_disc_iterator_4_2().

◆ invariant()

bool fields::property_disc_iterator_4_2::invariant ( ) const
virtual

The class invariant.

Invariant
Issue:
We can't support prop base < coord base in this implementation because we traverse from the prop down and we won't find the coord eval.
Invariant
Precondition

Reimplemented from fields::property_disc_iterator.

Definition at line 402 of file property_disc_iterator_4_2.cc.

Referenced by clone().

◆ is_ancestor_of()

bool fields::property_disc_iterator_4_2::is_ancestor_of ( const any xother) const
virtual

True if other conforms to this.

Reimplemented from fields::property_disc_iterator.

Definition at line 364 of file property_disc_iterator_4_2.cc.

References clone().

Referenced by reset().

◆ next()

void fields::property_disc_iterator_4_2::next ( bool  xtruncate)
virtual

Makes this the next member of the subset. If xtruncate, new this is not less than old this, i.e. the depth-first descent is truncated and the cover of this is not visited.

Precondition
  • !is_done()
Postcondition
  • !is_done() ? action() == POSTVISIT_ACTION : true

Reimplemented from sheaf::depth_first_iterator.

Definition at line 235 of file property_disc_iterator_4_2.cc.

References reset().

◆ reset()

void fields::property_disc_iterator_4_2::reset ( bool  xreset_markers = true)
virtual

Restarts the iteration.

Reimplemented from sheaf::depth_first_iterator.

Definition at line 330 of file property_disc_iterator_4_2.cc.

References is_ancestor_of().

Referenced by next().


The documentation for this class was generated from the following files: