Results 1 to 2 of 2
  1. #1
    Mazharul is offline Member
    Join Date
    Aug 2008
    Posts
    12
    Rep Power
    0

    Default 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. #2
    mtyoung is offline Senior Member
    Join Date
    Dec 2008
    Location
    Hong Kong
    Posts
    473
    Rep Power
    6

    Default

    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
    add element add method, addAll method etc, read API
    Vector (Java Platform SE 6)

Similar Threads

  1. vector - get
    By natdizzle in forum New To Java
    Replies: 2
    Last Post: 01-02-2009, 05:09 AM
  2. Vector Errors...
    By Nakira in forum New To Java
    Replies: 6
    Last Post: 11-12-2008, 03:49 PM
  3. vector list search
    By hezfast2 in forum New To Java
    Replies: 2
    Last Post: 06-14-2008, 07:48 PM
  4. Vector problem
    By Ace_Of_John in forum New To Java
    Replies: 1
    Last Post: 01-27-2008, 09:53 PM
  5. Vector help
    By king_arthur in forum New To Java
    Replies: 3
    Last Post: 01-22-2008, 08:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •