Structures_LinkedList_Double
[ class tree: Structures_LinkedList_Double ] [ index: Structures_LinkedList_Double ] [ all elements ]

File: Double.php

Source Location: /Structures_LinkedList-0.2.2/Structures/LinkedList/Double.php

Classes:

Structures_LinkedList_Double
The Structures_LinkedList_Double class represents a linked list structure composed of Structures_LinkedList_DoubleNode objects.
Structures_LinkedList_DoubleNode
The Structures_LinkedList_DoubleNode class represents a node in a Structures_LinkedList_Double linked list structure.

Page Details:

Linked list structure

This package implements a doubly linked list structure. Each node (Structures_LinkedList_DoubleNode object) in the list (Structures_LinkedList_Double) knows the previous node and the next node in the list. Unlike an array, you can insert or delete nodes at arbitrary points in the list.

If your application normally traverses the linked list in a forward-only direction, use the singly-linked list implemented by Structures_LinkedList_Single. If, however, your application needs to traverse the list backwards, or insert nodes into the list before other nodes in the list, use the double-linked list implemented by Structures_LinkedList_Double to give your application better performance at the cost of a slightly larger memory footprint.

Structures_LinkedList_Double implements the Iterator interface so control structures like foreach($list as $node) and while($list->next()) work as expected.

To use this package, derive a child class from Structures_LinkedList_DoubleNode and add data to the object. Then use the Structures_LinkedList_Double class to access the nodes.

PHP version 5

LICENSE: Copyright 2006 Dan Scott

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Includes:

require_once('PEAR/Exception.php') [line 58]
require_once('Single.php') [line 59]

Documentation generated on Mon, 11 Mar 2019 15:38:21 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.