Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Arrys vs Vectors
Re: Arrys vs Vectors [message #30285 is a reply to message #30284] Tue, 21 December 2010 21:54 Go to previous messageGo to previous message
281264 is currently offline  281264
Messages: 270
Registered: June 2010
Location: Spain
Experienced Member
Quote:

why cant Line2D have Point2D copies in it?



Actually this is the current design (+Vectors) to store the geometrical classes. I am dubious about the appropriateness of using Array + pointers.

In general the construction of geometrical entities is done from bottom up: first points, then lines/curves that contain end/intermediate points, then surfaces than contain lines or curves, then solid objects that contain surfaces. So, every class needs to reference somehow to its constitutive lower classes ( a line to its two points, etc). So my question is:

1.- either to copy the classes of the lower elements inside the upper element: I think this would imply more space to store de data; this solution can be solved by using Vector as container. I think this option is faster since Vector is faster than Array.

2.-or to use pointers to achieve the same, then the model will be smaller. This needs the usage of Array. This option looks slower than 1.

I don’t know what implications might arise from the usage of 2 instead of 1. What do you think?
Thanks.

Best wishes,
Javier
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: asxml...or like I would like to keep encoding...
Next Topic: :( errors on sfx project
Goto Forum:
  


Current Time: Fri May 10 22:33:30 CEST 2024

Total time taken to generate the page: 0.02099 seconds