# Thread: Vector<Point2D> list = new Vector<Point2D>();Is it possible for 15,000 Point2D obj???

1. Member
Join Date
Aug 2008
Posts
12
Rep Power
0

## Vector<Point2D> list = new Vector<Point2D>();Is it possible for 15,000 Point2D obj???

Sir,
Considering only fore-ground pixels co-ordinate, I want to extract only those points that will form a Convex Hull according to Graham Scan algo.So,firstly I want to insert all fore-ground pixels co-ordinate into a vector which will be by "Vector<Point2D> list = new Vector<Point2D>();,for about 15,000 co-ordinates".Is it vaild or possible using type "Point" or "point2D" objects. Latter ,for the reason of backtracking I have to use "Stack<Point2D>".
Again is it poosible for about 15,000 Point2D objects? Also I have some calculation taking (x,y) form particular point from stack
If possible plz help me for:
1)what is the syntax for how about 15000 co-ordinates will be inserted in using "vector<Point2D> "?(I have image raw data[][] and i want to use that).

2) How stack is used to insert Point2D class objects (suppose number of objects is 15,000)integer co-ordinate in the form Stack<Point2D>
................
...........SORRY for bothering and many many thanks for helping me many times earlier...

2. Senior Member
Join Date
Dec 2008
Location
Hong Kong
Posts
473
Rep Power
8
stack is subclass of vector... if vector can, stack can

i think it is ok for vector to have 15000 elements
vector store objects, so it is possible to store Point or Point2D

you need to declare and initialize a Vector by default constructor Vector() or Vector(int initialCapacity) etc... read API