MLelement<E> is the basic element used to implement a Multilist in BRIDGES and is inherited from SLelement<E>



How does the MLelement<E> work?





This class extends SLelement (singly linked list element) to build multi-lists; multilists extend singly linked lists, by allowing any element of the list to be a list. Multilist elements contain a tag (getTag()/setTag()) that indicates if the element is a sublist or not; If the element points to a sublist, then the sublist field is the beginning of this sublist. If not, the data field contains the user specified data item and list continues (getNext()/setNext()). As in singly linked elements, the next pointer points to the following list element of the list or sublist.


See also

This tutorial gives an introduction to the usage of multi list. You can find the complete documentation of the features in the Doxygen documentation of the following classes and functions:

  1. MLelement [Java] [C++] [Python]
  2. Element [Java] [C++] [Python]
  3. ElementVisualizer [Java] [C++] [Python]
  4. LinkVisualizer [Java] [C++] [Python]
  5. Color [Java] [C++] [Python]

MLelement - An Example BRIDGES program

Example Details

Here is the final code:

Java
C++
Python

	  

	  
	  

Bridges Visualization

Well done! You’ve just created your Multilist!