Results 1 to 5 of 5

Thread: Is it possible to implement linked lists in Processing

  1. #1
    Join Date
    Apr 2010
    Posts
    26

    Is it possible to implement linked lists in Processing

    I am currently learning Processing language. I am learning Processing through tutorials. But I'm supposed to use this language to do a project for one of my classes. Under this project, I think having to use a linked list (I used linked lists in C++, but as it is relatively difficult to do graphics programming in C++ for a non professional I had to find simpler language). The problem is that in the tutorials, I found lots of information on how to display pictures and drawings on the screen, but nothing (or almost) on data structures. Do you know if it is possible to implement linked lists? Otherwise is there the possibility to include Java code, but I avoid because it will make me a language to learn and more, all for a project in one course?

  2. #2
    Join Date
    Nov 2008
    Posts
    1,054

    Re: Is it possible to implement linked lists in Processing

    You can surely find very easy course/tutorial on the algorithms of different data structures. To make a linked list:

    - We must create an object "node" that contains the data and the reference to the next item
    - In general, it has also been "linked list" which has the first element of the list.

    It recognizes the end of the list because the reference to the next element is null (or empty). After, you have to implement all the features that interest you for your list.

  3. #3
    Join Date
    May 2009
    Posts
    511

    Re: Is it possible to implement linked lists in Processing

    Is it necessary? A rule of thumb says that language is based on Java, you will have access to Java classes without problems, such as LinkedList, which is a linked list, right? But there is no pointer in Java, it uses only reference to the object. I think it would be much easier to use java. But since you did not want too, and it's always a good exercise to do once in your life a linked list by yourself.

  4. #4
    Join Date
    Apr 2010
    Posts
    26

    Re: Is it possible to implement linked lists in Processing

    The algorithm does not pose me a problem, I already have several courses on this and I know how to manipulate linked lists. What bothers me is that I do not know how to encode it with Processing. In tutorial there is nothing mentioned about memory pointer, that allows you to use linked list. I will definitely try to see LinkedList to know if it helps.

  5. #5
    Join Date
    Nov 2008
    Posts
    996

    Re: Is it possible to implement linked lists in Processing

    In practice, if it is as clear as in Java and there are no pointers in Java. Only references. A reference is (roughly) equals to a pointer. For someone who comes from C, I would say that we must see to simplify the Java language as a pointer while (except that there is no need to manage the release because the garbage collector takes care of everything). This means that there is no principle of local object.
    For example:
    Code:
     MyObject obj;
     MyObject obj2;
    Do not instantiate this object code as in C. And if we
    Code:
     MyObject obj;
     MyObject obj2;
     obj = new MyObject ();
     obj2 = obj;
    References all point to the two same instance. For proof, simply display a trace in the constructor.

Similar Threads

  1. How to use different CSS Lists?
    By super soaker in forum Software Development
    Replies: 5
    Last Post: 29-01-2010, 08:36 PM
  2. What is a linked list?
    By Migueel in forum Software Development
    Replies: 5
    Last Post: 28-11-2009, 11:03 PM
  3. Mailing lists in Thunderbird
    By James D. in forum Technology & Internet
    Replies: 3
    Last Post: 10-02-2009, 09:37 PM
  4. How to Build An Opt-In Mailing Lists?
    By monsitj in forum Tips & Tweaks
    Replies: 0
    Last Post: 06-01-2009, 10:46 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,990,595.05885 seconds with 17 queries