Icontem

JavaScript Tree Linked List: Create a binary tree and/or a double linked list

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2014-07-27 (2 years ago) RSS 2.0 feedNot enough user ratingsTotal: 137 All time: 327 This week: 38Up
Version License JavaScript version Categories
ttreelist 1.0.1GNU Lesser Genera...1.2Data types
Description Author

This object can create a binary tree and/or a double linked list.

It can create a binary tree and/or a double linked list from values taken from arrays or objects.

The object can also traverse the tree starting from the root element, the first element or the last element and move up, left, right, back and forth.

Innovation Award
JavaScript Programming Innovation award nominee
May 2014
Number 3


Prize: One year Codenvy Developer hosted cloud IDE premium plan
Binary trees and linked lists are often used by applications that need to add and remove lists of elements dynamically.

This object can manage lists of elements managed as binary tries or linked lists.

Manuel Lemos
Picture of Thomas Björk
  Performance   Level  
Name: Thomas Björk <contact>
Classes: 5 packages by
Country: Sweden Sweden
Innovation award
Innovation award
Nominee: 4x

Details
TreeList
=========
TreeList is an implementation of a binaty tree combined with a double linked
list. You can easily build an hierarchy of your objects or arrays on a specified
index.


Class TTreeList
---------------
properties
  root             The root node of the tree
  first            The first node of the double linked list
  last             The last node of the double linked list
  treeCount        The number of nodes in the tree and double linked list
  isDirty          Set if a node has been added since the last build

functions
  add              Add a new node to the tree/double linked list
  count            The number of nodes in the raw tree (includes nodes with
                   duplicate values)
  search           Search for a node by value in the tree
  build            Build a tree and a double linked list

Class TTreeListNode
-------------------
properties
  prev             A pointer to the previous node in the double linked list
  left             A pointer to the left node in the tree
  parent           A pointer to the parent node in the tree
  right            A pointer to the right node in the tree
  next             A pointer to the next node in the double linked list

functions
  addPayload       Add a node from the TTreeList. If the value is a duplicate
                   then it is added as well
  getPayloadCount  Return the number of payloads this node holds
  setPayloadIndex  Set the index for which payload should return a value with
                   the get function
  get              Return the value of the given index from the active payload



  Files folder image Files  
File Role Description
Accessible without login Plain text file example.html Example A simple example
Accessible without login Plain text file readme.txt Doc. Simple documentation
Accessible without login Plain text file README.md Data Auxiliary data
Plain text file treelist.js Class Class definitions

 Version Control Unique User Downloads Download Rankings  
 75%
Total:137
This week:0
All time:327
This week:38Up
User Comments (1)
Thank you for this.
2 years ago (hong jaemin)
75%StarStarStarStar