entity set implementation for iMesh and iGeom
Mark Beall
mbeall at simmetrix.com
Thu Nov 5 10:38:22 CST 2009
Are the behaviors you describe documented somewhere? We had a number
of questions on how the entity sets are supposed to behave with the
boolean ops that we couldn't find answers to.
Thanks,
mark
On Nov 5, 2009, at 10:25 AM, Carl Ollivier-Gooch wrote:
> Ottmar Klaas wrote:
>> Hi,
>> while looking at implementing entity sets, we ran into a few
>> questions, and I was wondering if someone could help us sort this
>> out. According to the documentation of iMesh/iGeom entity sets can
>> be ordered or unordered. Based on what we could find in the
>> documentation, the only differentiator between the two sets is that
>> "Unordered entity sets can contain a given entity or set only
>> once", opening up a variety of possible implementations for ordered
>> sets. However, the naming of parameters (e.g. int isList) to
>> differentiate between ordered and unordered sets seems to imply
>> that ordered sets are to be implemented based on a list data
>> structure. We were wondering if you can give us more information
>> regarding the requirements for the entity set implementation. Is
>> your intention to prescribe the implementation (classical list data
>> structure for ordered sets, and a set data structure for unordered
>> sets)? If not, could you define the requirements for the entity set
>> implementations, e.g. how fast is random access supposed to be
>> (e.g. O(n) or faster), are ordered sets order preserving in the
>> sense that the order in which I add entities to an ordered set is
>> the order in which the iterator will return the entities, etc.?
>
> While STL lists and sets are possibilities for implementation, you
> can do them some other way if you prefer.
>
> There is no performance spec (in particular, iMesh sets don't
> support random access, so definitely no spec there).
>
> The distinguishing feature is the one you asked about: an iterator
> has to return the entities in the order added. Also, boolean ops on
> two ordered sets have prescribed behavior (boolean ops on one
> ordered and one unordered set behave as if both were unordered). I
> seem to recall that removing an entity that appears multiple times
> in an ordered set removes the -last- copy, but that might be wrong...
>
> Cheers,
> Carl
>
> --
> ------------------------------------------------------------------------
> Dr. Carl Ollivier-Gooch, P.Eng. Voice:
> +1-604-822-1854
> Associate Professor Fax:
> +1-604-822-2403
> Department of Mechanical Engineering email: cfog at mech.ubc.ca
> University of British Columbia http://www.mech.ubc.ca/~cfog
> Vancouver, BC V6T 1Z4 http://tetra.mech.ubc.ca/ANSLab/
> ------------------------------------------------------------------------
More information about the tstt-interface
mailing list