Skip to content

#247 indicex() method for GeometryType

Metadata

Property Value
Reported by Carsten Gräser (graeser@math.fu-berlin.de)
Reported at Jan 26, 2007 15:50
Type Feature Request
Version Git (pre2.4) [autotools]
Operating System Unspecified / All
Last edited by Oliver Sander (oliver.sander@tu-dresden.de)
Last edited at Oct 20, 2008 19:57
Closed by Oliver Sander (oliver.sander@tu-dresden.de)
Closed at Oct 20, 2008 19:57
Closed in version Unknown
Resolution Won't implement
Comment No reaction -- no numbers showing that this is really important. Closing as 'wont't implement'.

Description

I suggest to add an index to each GeometryType for the following reasons:

1)Since indices are only consecutive within one GeometryType, one can not avoid an GeometryType->something map if you want to associate Information to an entity. This could be 'map<GeometryType,vector>' or 'map<GeometryType,someIndexOffset>'. But even if the map is small this is slower then a corresponding 'vector' or 'vector' approach. Having an index one could use this faster approach.

2)For the current GeometryTypes this could be computed on the fly by unsigned int index() const {if (dim_<2) return dim_; return 4*dim_ + basicType_ - 6;}

3)This improvement might be small in general, but if you do a lot of index/subindex operations and no or just a few numerical computations it is significant, especially in combination with #246 (closed).