diff options
author | truebrain <truebrain@openttd.org> | 2009-01-15 16:53:18 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2009-01-15 16:53:18 +0000 |
commit | e67040a1a0d831f2cf345f28917fb03ef182bf2c (patch) | |
tree | ce6e72c35aed80ebf44287395bf63c0b1eb4b13d /bin/ai/library/queue/fibonacci_heap | |
parent | ae5c8a8b359255e4b026543c736d42601ea7a599 (diff) | |
download | openttd-e67040a1a0d831f2cf345f28917fb03ef182bf2c.tar.xz |
(svn r15092) -Fix [NoAI]: make the library internal class name consistant with their directory name
Diffstat (limited to 'bin/ai/library/queue/fibonacci_heap')
-rw-r--r-- | bin/ai/library/queue/fibonacci_heap/library.nut | 6 | ||||
-rw-r--r-- | bin/ai/library/queue/fibonacci_heap/main.nut | 16 |
2 files changed, 11 insertions, 11 deletions
diff --git a/bin/ai/library/queue/fibonacci_heap/library.nut b/bin/ai/library/queue/fibonacci_heap/library.nut index 727a2477d..6cbd614da 100644 --- a/bin/ai/library/queue/fibonacci_heap/library.nut +++ b/bin/ai/library/queue/fibonacci_heap/library.nut @@ -1,14 +1,14 @@ /* $Id$ */ -class FibonacciHeap extends AILibrary { +class Fibonacci_Heap extends AILibrary { function GetAuthor() { return "OpenTTD NoAI Developers Team"; } function GetName() { return "Fibonacci Heap"; } function GetShortName() { return "QUFH"; } function GetDescription() { return "An implementation of a Fibonacci Heap"; } function GetVersion() { return 1; } function GetDate() { return "2008-08-22"; } - function CreateInstance() { return "FibonacciHeap"; } + function CreateInstance() { return "Fibonacci_Heap"; } function GetCategory() { return "Queue"; } } -RegisterLibrary(FibonacciHeap()); +RegisterLibrary(Fibonacci_Heap()); diff --git a/bin/ai/library/queue/fibonacci_heap/main.nut b/bin/ai/library/queue/fibonacci_heap/main.nut index 7c6b3ece2..6be8bdd49 100644 --- a/bin/ai/library/queue/fibonacci_heap/main.nut +++ b/bin/ai/library/queue/fibonacci_heap/main.nut @@ -7,7 +7,7 @@ * Insert is implemented as a lazy insert, as it will simply add the new * node to the root list. Sort is done on every Pop operation. */ -class FibonacciHeap { +class Fibonacci_Heap { _min = null; _min_index = 0; _min_priority = 0; @@ -67,7 +67,7 @@ class FibonacciHeap { function Exists(item); }; -function FibonacciHeap::Insert(item, priority) { +function Fibonacci_Heap::Insert(item, priority) { /* Create a new node instance to add to the heap. */ local node = Node(); /* Changing params is faster than using constructor values */ @@ -86,7 +86,7 @@ function FibonacciHeap::Insert(item, priority) { _count++; } -function FibonacciHeap::Pop() { +function Fibonacci_Heap::Pop() { if (_count == 0) return null; @@ -150,16 +150,16 @@ function FibonacciHeap::Pop() { return z.item; } -function FibonacciHeap::Peek() { +function Fibonacci_Heap::Peek() { if (_count == 0) return null; return _min.item; } -function FibonacciHeap::Count() { +function Fibonacci_Heap::Count() { return _count; } -function FibonacciHeap::Exists(item) { +function Fibonacci_Heap::Exists(item) { return ExistsIn(_root_list, item); } @@ -169,7 +169,7 @@ function FibonacciHeap::Exists(item) { * @param item The item to search for. * @return True if the item is found, false otherwise. */ -function FibonacciHeap::ExistsIn(list, item) { +function Fibonacci_Heap::ExistsIn(list, item) { foreach (val in list) { if (val.item == item) { @@ -190,7 +190,7 @@ function FibonacciHeap::ExistsIn(list, item) { /** * Basic class the fibonacci heap is composed of. */ -class FibonacciHeap.Node { +class Fibonacci_Heap.Node { degree = null; child = null; |