package util
The util
package contains classes, traits and objects for basic utility
functions.
- Alphabetic
- By Inheritance
- util
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Package Members
Type Members
- class BiMap[K, V] extends AnyRef
The
BiMap
class maps keys to values and values to keys.The
BiMap
class maps keys to values and values to keys.- K
the key type
- V
the value type
- class BpTreeMap[K, V] extends AbstractMap[K, V] with SortedMap[K, V] with DefaultSerializable
The
BpTreeMap
class provides B+Tree maps.The
BpTreeMap
class provides B+Tree maps. B+Trees are used as multi-level index structures that provide efficient access for both point queries and range queries.- See also
docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html
www.scala-lang.org/api/current/#scala.collection.mutable.MapLike ------------------------------------------------------------------------------
- class CircularQueue[A] extends AnyRef
The
CircularQueue
provides a circular queue that can be used to store the latest 'cap' elements. - class EasyWriter extends Writer
The
EasyWriter
class makes it easy to switch between writing to standard output and a (log) file. - trait Error extends AnyRef
The
Error
trait is used to report errors showing the class and method within which the error or flaw occurred.The
Error
trait is used to report errors showing the class and method within which the error or flaw occurred. For performance reasons, 'getClass' is commented out. Uncomment to include this information. - trait Identifiable extends Error
The
Identifiable
trait provides unique identification for simulation components, entities and events.The
Identifiable
trait provides unique identification for simulation components, entities and events. Includes a mandatory id and an optional name. - trait Locatable extends Error
The
Locatable
trait provides location information/coordinates for objects (e.g.,Component
s). - trait Matchable extends AnyRef
The
Matchable
trait serves as a bases for string pattern matchers. - class MemoryMappedFile extends AnyRef
The
MemoryMappedFile
class provides support for memory-mapped files.The
MemoryMappedFile
class provides support for memory-mapped files. This version works forArray [Byte]
. - class MemoryMappedFileD extends AnyRef
The
MemoryMappedFileD
class provides support for memory-mapped files.The
MemoryMappedFileD
class provides support for memory-mapped files. This version works forDouble
- class MergeSortIndirect extends AnyRef
The
MergeSortIndirect
class provides an implementation of Indirect Merge Sort, a version of mergesort that does not re-arrange the array, but modifies an Int array called 'perm' such that 'perm(i)' is the index of the i-th smallest entry in the array (i.e., a(perm(i)) <= a(perm(i+1)).The
MergeSortIndirect
class provides an implementation of Indirect Merge Sort, a version of mergesort that does not re-arrange the array, but modifies an Int array called 'perm' such that 'perm(i)' is the index of the i-th smallest entry in the array (i.e., a(perm(i)) <= a(perm(i+1)). The 'isort' method returns the permutation that sorts array 'a' in 'perm'. Will indirectly sort any type supported by theVec_Elem
less-than operator.- See also
scalation.linalgebra.Vec_Elem
- class MultiSet[T] extends ListBuffer[T]
The
MultiSet
class provides an implementation for Union, Intersection and Subset for the genericMultiSet
data type that extendsListBuffer
. - class Node[K] extends Error
The
Node
class defines a splittable node type with methods for finding entries (keys and values). - trait PQItem extends Identifiable
The
PQItem
trait should be mixed in for items going on aPQueue
. - class PQueue[T <: PQItem] extends ReArray[T] with Serializable
The
PQueue
class provides a simple linear implementation for priority queues.The
PQueue
class provides a simple linear implementation for priority queues. Once bug in scala 2.8 if fixed, may wish to switch to logarithmic implementation inscala.collection.mutable.PriorityQueue
. - trait PackageInfo extends AnyRef
The
PackageInfo
trait provides methods to retrieve meta-data about packages. - class PatMatcher extends MatchResult with Matchable with Error
The
PatMatcher
class provides a simple means for using Java regular expressions.The
PatMatcher
class provides a simple means for using Java regular expressions. Following the Facade design pattern, it combines functionality from bothPattern
andMatcher
. A faster alternative isPatMatcherB
, see below. - class PriorityQueue[A] extends AbstractIterable[A] with Iterable[A] with IterableOps[A, Iterable, PriorityQueue[A]] with StrictOptimizedIterableOps[A, Iterable, PriorityQueue[A]] with Builder[A, PriorityQueue[A]] with Cloneable[PriorityQueue[A]] with Growable[A] with Serializable
The
PriorityQueues
class implements priority queues using a heap.The
PriorityQueues
class implements priority queues using a heap. To prioritize elements of type A there must be an implicit Ordering [A] available at creation.If multiple elements have the same priority in the ordering of this PriorityQueue, no guarantees are made regarding the order in which elements are returned by
dequeue
ordequeueAll
. In particular, that means this class does not guarantee first in first out behaviour that may be incorrectly inferred from the Queue part of the name of this class.Only the
dequeue
anddequeueAll
methods will return elements in priority order (while removing elements from the heap). Standard collection methods includingdrop
,iterator
, andtoString
will remove or traverse the heap in whichever order seems most convenient.Therefore, printing a
PriorityQueue
will not reveal the priority order of the elements, though the highest-priority element will be printed first. To print the elements in order, one must duplicate thePriorityQueue
(by usingclone
, for instance) and then dequeue them:- A
type of the elements in this priority queue.
val pq = collection.mutable.PriorityQueue(1, 2, 5, 3, 7) println(pq) // elements probably not in order println(pq.clone.dequeueAll) // prints ArraySeq(7, 5, 3, 2, 1)
Example: - class ReArray[A] extends AbstractSeq[A] with IndexedSeq[A] with Serializable
The
ReArray
class provides an implementation of mutable, resizable/dynamic arrays.The
ReArray
class provides an implementation of mutable, resizable/dynamic arrays. It is based on Scala'sResizableArray
trait with additions and modifications. Preliminary testing has shown it to be faster than its competition:ArrayList
andArrayBuffer
. ------------------------------------------------------------------------------------------- Added methods: 'shiftLeft', 'shiftLeft2', 'shiftRight', 'shiftRight2' and 'expand'. ------------------------------------------------------------------------------------------- Modified methods: 'reduceToSize': modified for performance reasons; instead of decreasing the size0 by 1 in a while loop and setting elements to null, it just decrements the size0 variable. FIX: possible minor memory leak 'companion': modified to return null as it is not required by our implementation; theReArray
object does not extendSeqFactory
and thus 'newBuilder [A]' is absent. 'update': modified to catch theIndexOutOfBoundsException' and automatically expand the array. 'constructor': modified to take in the initial length and a normal
Array; by doing this we can easily convert an object of type
Arrayto a
ReArrayas the internal 'array' is changed from
AnyRefto type
A'. ------------------------------------------------------------------------------------------- Modified variables: 'array': the type is changed toA
fromAnyRef
; this helps in assigning anArray [A]
to aReArray [A]
; the initial value is changed to check if '_array' is null. 'size0': the initial value is changed to take care if '_array' is null. ------------------------------------------------------------------------------------------- - class Sorting[T] extends AnyRef
The
Sorting
class provides direct and indirect methods to:The
Sorting
class provides direct and indirect methods to:find 'k'-th median ('k'-th smallest element) using
QuickSelect
sort large arrays usingQuickSort
sort large arrays usingMergeSort
(slower than quicksort, but stable) sort small arrays usingSelectionSort
Direct methods are faster, but modify the array, while indirect methods are slower, but do not modify the array. This class is generic.
- See also
SortingC
for a version of this class specialized forComplex
.SortingD
for a version of this class specialized forDouble
.SortingI
for a version of this class specialized forInt
.SortingL
for a version of this class specialized forLong
.SortingQ
for a version of this class specialized forRational
.SortingR
for a version of this class specialized forReal
.SortingS
for a version of this class specialized forStrNum
.
- class SortingC extends AnyRef
The
SortingC
class provides direct and indirect methods to:The
SortingC
class provides direct and indirect methods to:find 'k'-th median ('k'-th smallest element) using
QuickSelect
sort large arrays usingQuickSort
sort small arrays usingSelectionSort
Direct methods are faster, but modify the array, while indirect methods are slower, but do not modify the array. This class is specialized for
Complex
.- See also
Sorting
for a generic version of this class.
- class SortingD extends AnyRef
The
SortingD
class provides direct and indirect methods to:The
SortingD
class provides direct and indirect methods to:find 'k'-th median ('k'-th smallest element) using
QuickSelect
sort large arrays usingQuickSort
sort small arrays usingSelectionSort
Direct methods are faster, but modify the array, while indirect methods are slower, but do not modify the array. This class is specialized for
Double
.- See also
Sorting
for a generic version of this class.
- class SortingI extends AnyRef
The
SortingI
class provides direct and indirect methods to:The
SortingI
class provides direct and indirect methods to:find 'k'-th median ('k'-th smallest element) using
QuickSelect
sort large arrays usingQuickSort
sort small arrays usingSelectionSort
Direct methods are faster, but modify the array, while indirect methods are slower, but do not modify the array. This class is specialized for
Int
.- See also
Sorting
for a generic version of this class.
- class SortingL extends AnyRef
The
SortingL
class provides direct and indirect methods to:The
SortingL
class provides direct and indirect methods to:find 'k'-th median ('k'-th smallest element) using
QuickSelect
sort large arrays usingQuickSort
sort small arrays usingSelectionSort
Direct methods are faster, but modify the array, while indirect methods are slower, but do not modify the array. This class is specialized for
Long
.- See also
Sorting
for a generic version of this class.
- class SortingQ extends AnyRef
The
SortingQ
class provides direct and indirect methods to:The
SortingQ
class provides direct and indirect methods to:find 'k'-th median ('k'-th smallest element) using
QuickSelect
sort large arrays usingQuickSort
sort small arrays usingSelectionSort
Direct methods are faster, but modify the array, while indirect methods are slower, but do not modify the array. This class is specialized for
Rational
.- See also
Sorting
for a generic version of this class.
- class SortingR extends AnyRef
The
SortingR
class provides direct and indirect methods to:The
SortingR
class provides direct and indirect methods to:find 'k'-th median ('k'-th smallest element) using
QuickSelect
sort large arrays usingQuickSort
sort small arrays usingSelectionSort
Direct methods are faster, but modify the array, while indirect methods are slower, but do not modify the array. This class is specialized for
Real
.- See also
Sorting
for a generic version of this class.
- class SortingS extends AnyRef
The
SortingS
class provides direct and indirect methods to:The
SortingS
class provides direct and indirect methods to:find 'k'-th median ('k'-th smallest element) using
QuickSelect
sort large arrays usingQuickSort
sort small arrays usingSelectionSort
Direct methods are faster, but modify the array, while indirect methods are slower, but do not modify the array. This class is specialized for
StrNum
.- See also
Sorting
for a generic version of this class.
- class SortingT extends AnyRef
The
SortingT
class provides direct and indirect methods to:The
SortingT
class provides direct and indirect methods to:find 'k'-th median ('k'-th smallest element) using
QuickSelect
sort large arrays usingQuickSort
sort small arrays usingSelectionSort
Direct methods are faster, but modify the array, while indirect methods are slower, but do not modify the array. This class is specialized for
TimeNum
.- See also
Sorting
for a generic version of this class.
- class Wildcard extends Matchable
The
Wildcard
value class provides an implementation for wildcard string matching that checks if the 'pattern' string matches against a given 'self' string based on single (CHAR_WILD_ONE) and/or multiple (CHAR_WILD_MANY) wildcards.
Value Members
- val NS_PER_MS: Double
The number of nanoseconds per millisecond
- def banner(str: String): Unit
Print a banner, i.e., a string in a box.
Print a banner, i.e., a string in a box.
- str
the string to put in the banner
- def gauge[R](block: => R): Double
Calculate the elapsed time in milliseconds (ms) for the execution of an arbitrary block of code: 'gauge { block }'.
Calculate the elapsed time in milliseconds (ms) for the execution of an arbitrary block of code: 'gauge { block }'. Return the block of code's elapsed time.
- block
the block of code to be executed
- See also
http://stackoverflow.com/questions/9160001/how-to-profile-methods-in-scala
- def getFromURL_File(path: String): Iterator[String]
Return a line iterator for a line-oriented data source (e.g., CSV file).
Return a line iterator for a line-oriented data source (e.g., CSV file). The data source is accessed via (1) URL, (2) file's absolute path, or (3) file's relative path (relative to 'DATA-DIR').
- path
the path name of the data source (via URL or file's path name)
- See also
stackoverflow.com/questions/5713558/detect-and-extract-url-from-a-string
- def removeAt(str: String, i: Int, n: Int = 1): String
Remove 'n' characters starting at position 'i' in string 'str' and return the new string.
Remove 'n' characters starting at position 'i' in string 'str' and return the new string.
- str
the source string
- i
the starting position for character removal
- n
the number of characters to remove
- def sline(n: Int = 60): String
Make a string for use in printing a line of '-'s.
Make a string for use in printing a line of '-'s.
- n
the number of '-'s to use
- def time[R](block: => R): R
Print the elapsed time in milliseconds (ms) for the execution of an arbitrary block of code: 'time { block }'.
Print the elapsed time in milliseconds (ms) for the execution of an arbitrary block of code: 'time { block }'. Return any result produced by the block of code.
- block
the block of code to be executed
- See also
http://stackoverflow.com/questions/9160001/how-to-profile-methods-in-scala
- def timed[R](block: => R): (R, Double)
Calculate the elapsed time in milliseconds (ms) for the execution of an arbitrary block of code: 'timed { block }'.
Calculate the elapsed time in milliseconds (ms) for the execution of an arbitrary block of code: 'timed { block }'. Return any result produced by the block of code and its elapsed time.
- block
the block of code to be executed
- See also
http://stackoverflow.com/questions/9160001/how-to-profile-methods-in-scala
- object AnObject extends Serializable
The
AnObject
object is a sample singleton object that is made serialiable via "extends Serializable".The
AnObject
object is a sample singleton object that is made serialiable via "extends Serializable". May also make is serializable by making it a case object. - object BiMapTest extends App
The
BiMapTest
object is used the test theBiMap
class.The
BiMapTest
object is used the test theBiMap
class. > runMain scalation.util.BiMapTest - object BinarySearch
The
BinarySearch
object provides a method for binary search. - object BpTreeMapTest extends App
The
BpTreeMapTest
object is used to test theBpTreeMap
class by inserting increasing key values.The
BpTreeMapTest
object is used to test theBpTreeMap
class by inserting increasing key values. > run-main scalation.util.BpTreeMapTest - object BpTreeMapTest2 extends App
The
BpTreeMapTest2
object is used to test theBpTreeMap
class by inserting random key values.The
BpTreeMapTest2
object is used to test theBpTreeMap
class by inserting random key values. > run-main scalation.util.BpTreeMapTest2 - object CircularQueueTest extends App
The
CircularQueueTest
object is used to test theCircularQueue
class.The
CircularQueueTest
object is used to test theCircularQueue
class. > runMain scalation.util.CircularQueueTest - object CommentExtractor extends App
The
CommentExtractor
object is used to extract comments from source code (for example to send it to a spell checker).The
CommentExtractor
object is used to extract comments from source code (for example to send it to a spell checker). It reads from standard input and writes to standard output.- See also
http://ostermiller.org/findcomment.html > runMain scalation.util.CommentExtractor
- object EasyWriterTest extends App
The
EasyWriterTest
object is used to test theEasyWriter
class.The
EasyWriterTest
object is used to test theEasyWriter
class. It will write into a file, unless there is a command-line argument. > runMain scalation.util.EasyWriterTest - object FloatLiteral extends App
The
FloatLiteral
object is used to add '0' to floating point literals, which end in a dot ('.'), e.g., "12." -> "12.0".The
FloatLiteral
object is used to add '0' to floating point literals, which end in a dot ('.'), e.g., "12." -> "12.0".- See also
http://stackoverflow.com/questions/9655080/scala-operator-oddity "In scala 2.9 and before, 2. is interpreted as 2.0 so the ambiguous dot denotes a float literal. You should explicitly call the method by using the syntax (2).+(2). The ambiguous floating point syntax has been be deprecated since scala 2.10."
- object Identifiable
The
Identifiable
object is used to generate unique identifiers. - object MemoryMappedFileDTest extends App
The
MemoryMappedFileDTest
is used to test theMemoryMappedFileD
class.The
MemoryMappedFileDTest
is used to test theMemoryMappedFileD
class. > runMain scalation.util.MemoryMappedFileDTest - object MemoryMappedFileTest extends App
The
MemoryMappedFileTest
is used to test theMemoryMappedFile
class.The
MemoryMappedFileTest
is used to test theMemoryMappedFile
class. > runMain scalation.util.MemoryMappedFileTest - object MergeSortIndirectTest extends App
The
MergeSortIndirectTest
is used to test theMergeSortIndirect
class.The
MergeSortIndirectTest
is used to test theMergeSortIndirect
class. This test illustrates sorting multiple types. > runMain scalation.util.MergeSortIndirectTest - object MergeSortIndirectTest2 extends App
The
MergeSortIndirectTest2
is used to test theMergeSortIndirect
class.The
MergeSortIndirectTest2
is used to test theMergeSortIndirect
class. This test illustrates sorting multiple columns. > runMain scalation.util.MergeSortIndirectTest2 - object Monitor
The
Monitor
object is used to trace the actions/events in the models. - object MultiSet extends Serializable
The
MultiSet
object is the companion object for theMultiSet' class.
- object MultiSetTest extends App
The
MultiSetTest
object is used to test theMultiSet
class.The
MultiSetTest
object is used to test theMultiSet
class. > runMain scalation.util.MultiSetTest - object NodeTest extends App
The
NodeTest
object is used to test theNode
class.The
NodeTest
object is used to test theNode
class. > runMain scalation.util.NodeTest - object ObjectSerialization extends App
The
ObjectSerialization
object is used to serialize a Scala singleton object.The
ObjectSerialization
object is used to serialize a Scala singleton object. > runMain scalation.util.ObjectSerialization - object PQueueTest extends App
The
PQueueTest
object is used to test thePQueue
class.The
PQueueTest
object is used to test thePQueue
class. > runMain scalation.util.PQueueTest - object PatMatcherTest extends App
The
PatMatcherTest
object is used to test thePatMatcher
vs.The
PatMatcherTest
object is used to test thePatMatcher
vs.PatMatcherB
classes. It compares the match results and performance of Java and Brics regex pattern matchers.- See also
http://lh3lh3.users.sourceforge.net/reb.shtml > runMain scalation.util.PatMatcherTest
- object PriorityQueue extends SortedIterableFactory[PriorityQueue]
The
PriorityQueue
object ...The
PriorityQueue
object ...- Annotations
- @SerialVersionUID()
- object QuasiQuoteTest extends App
The
QuasiQuoteTest
object is used to test how Quasi-Quotes can be used for code generation.The
QuasiQuoteTest
object is used to test how Quasi-Quotes can be used for code generation. FIX: generate class files (.class) rather than execute the code > runMain scalation.util.QuasiQuoteTest - object ReArray extends Serializable
The
ReArray
object is the companion object for theReArray
class. - object ReArrayTest extends App
The
ReArrayTest
object tests the operations provided byReArrayTest
.The
ReArrayTest
object tests the operations provided byReArrayTest
. > run-main scalation.util.ReArrayTest - object RunSpellCheck extends App
The
RunSpellCheck
object is used to check the spelling of the a given package.The
RunSpellCheck
object is used to check the spelling of the a given package. The package directory (relative path) is entered as a command-line argument. Ex: 'scalation/math' > runMain scalation.util.RunSpellCheck <package directory> - object Sorting
The
Sorting
companion object provides shortcuts for calling methods from theSorting
class.The
Sorting
companion object provides shortcuts for calling methods from theSorting
class. Only works forArray [Double]
. - object SortingC
The
SortingC
companion object provides shortcuts for calling methods from theSortingC
class. - object SortingCTest extends App
The
SortingCTest
object is used to test the correctness and performance of the 'median' and 'imedian' methods in theSortingC
class. - object SortingCTest2 extends App
The
SortingCTest2
object is used to test the correctness and performance of the 'qsort' and 'iqsort' sorting methods in theSortingC
class. - object SortingCTest3 extends App
The
SortingCTest3
object is used to test the correctness and performance of the 'selsort' and 'iselsort' sorting methods in theSortingC
class. - object SortingCTest4 extends App
The
SortingCTest4
object is used to test the correctness and performance of the 'qsort2' and 'iqsort2' sorting methods in theSortingC
class.The
SortingCTest4
object is used to test the correctness and performance of the 'qsort2' and 'iqsort2' sorting methods in theSortingC
class. The sort is in decreasing order. - object SortingCTest5 extends App
The
SortingCTest5
object is used to test the correctness and performance of the 'selsort2' and 'iselsort2' sorting methods in theSortingC
class.The
SortingCTest5
object is used to test the correctness and performance of the 'selsort2' and 'iselsort2' sorting methods in theSortingC
class. The sort is in decreasing order. - object SortingD
The
SortingD
companion object provides shortcuts for calling methods from theSortingD
class. - object SortingDTest extends App
The
SortingDTest
object is used to test the correctness and performance of the 'median' and 'imedian' methods in theSortingD
class. - object SortingDTest2 extends App
The
SortingDTest2
object is used to test the correctness and performance of the 'qsort' and 'iqsort' sorting methods in theSortingD
class. - object SortingDTest3 extends App
The
SortingDTest3
object is used to test the correctness and performance of the 'selsort' and 'iselsort' sorting methods in theSortingD
class. - object SortingDTest4 extends App
The
SortingDTest4
object is used to test the correctness and performance of the 'qsort2' and 'iqsort2' sorting methods in theSortingD
class.The
SortingDTest4
object is used to test the correctness and performance of the 'qsort2' and 'iqsort2' sorting methods in theSortingD
class. The sort is in decreasing order. - object SortingDTest5 extends App
The
SortingDTest5
object is used to test the correctness and performance of the 'selsort2' and 'iselsort2' sorting methods in theSortingD
class.The
SortingDTest5
object is used to test the correctness and performance of the 'selsort2' and 'iselsort2' sorting methods in theSortingD
class. The sort is in decreasing order. - object SortingI
The
SortingI
companion object provides shortcuts for calling methods from theSortingI
class. - object SortingITest extends App
The
SortingITest
object is used to test the correctness and performance of the 'median' and 'imedian' methods in theSortingI
class. - object SortingITest2 extends App
The
SortingITest2
object is used to test the correctness and performance of the 'qsort' and 'iqsort' sorting methods in theSortingI
class. - object SortingITest3 extends App
The
SortingITest3
object is used to test the correctness and performance of the 'selsort' and 'iselsort' sorting methods in theSortingI
class. - object SortingITest4 extends App
The
SortingITest4
object is used to test the correctness and performance of the 'qsort2' and 'iqsort2' sorting methods in theSortingI
class.The
SortingITest4
object is used to test the correctness and performance of the 'qsort2' and 'iqsort2' sorting methods in theSortingI
class. The sort is in decreasing order. - object SortingITest5 extends App
The
SortingITest5
object is used to test the correctness and performance of the 'selsort2' and 'iselsort2' sorting methods in theSortingI
class.The
SortingITest5
object is used to test the correctness and performance of the 'selsort2' and 'iselsort2' sorting methods in theSortingI
class. The sort is in decreasing order. - object SortingL
The
SortingL
companion object provides shortcuts for calling methods from theSortingL
class. - object SortingLTest extends App
The
SortingLTest
object is used to test the correctness and performance of the 'median' and 'imedian' methods in theSortingL
class. - object SortingLTest2 extends App
The
SortingLTest2
object is used to test the correctness and performance of the 'qsort' and 'iqsort' sorting methods in theSortingL
class. - object SortingLTest3 extends App
The
SortingLTest3
object is used to test the correctness and performance of the 'selsort' and 'iselsort' sorting methods in theSortingL
class. - object SortingLTest4 extends App
The
SortingLTest4
object is used to test the correctness and performance of the 'qsort2' and 'iqsort2' sorting methods in theSortingL
class.The
SortingLTest4
object is used to test the correctness and performance of the 'qsort2' and 'iqsort2' sorting methods in theSortingL
class. The sort is in decreasing order. - object SortingLTest5 extends App
The
SortingLTest5
object is used to test the correctness and performance of the 'selsort2' and 'iselsort2' sorting methods in theSortingL
class.The
SortingLTest5
object is used to test the correctness and performance of the 'selsort2' and 'iselsort2' sorting methods in theSortingL
class. The sort is in decreasing order. - object SortingQ
The
SortingQ
companion object provides shortcuts for calling methods from theSortingQ
class. - object SortingQTest extends App
The
SortingQTest
object is used to test the correctness and performance of the 'median' and 'imedian' methods in theSortingQ
class. - object SortingQTest2 extends App
The
SortingQTest2
object is used to test the correctness and performance of the 'qsort' and 'iqsort' sorting methods in theSortingQ
class. - object SortingQTest3 extends App
The
SortingQTest3
object is used to test the correctness and performance of the 'selsort' and 'iselsort' sorting methods in theSortingQ
class. - object SortingQTest4 extends App
The
SortingQTest4
object is used to test the correctness and performance of the 'qsort2' and 'iqsort2' sorting methods in theSortingQ
class.The
SortingQTest4
object is used to test the correctness and performance of the 'qsort2' and 'iqsort2' sorting methods in theSortingQ
class. The sort is in decreasing order. - object SortingQTest5 extends App
The
SortingQTest5
object is used to test the correctness and performance of the 'selsort2' and 'iselsort2' sorting methods in theSortingQ
class.The
SortingQTest5
object is used to test the correctness and performance of the 'selsort2' and 'iselsort2' sorting methods in theSortingQ
class. The sort is in decreasing order. - object SortingR
The
SortingR
companion object provides shortcuts for calling methods from theSortingR
class. - object SortingRTest extends App
The
SortingRTest
object is used to test the correctness and performance of the 'median' and 'imedian' methods in theSortingR
class. - object SortingRTest2 extends App
The
SortingRTest2
object is used to test the correctness and performance of the 'qsort' and 'iqsort' sorting methods in theSortingR
class. - object SortingRTest3 extends App
The
SortingRTest3
object is used to test the correctness and performance of the 'selsort' and 'iselsort' sorting methods in theSortingR
class. - object SortingRTest4 extends App
The
SortingRTest4
object is used to test the correctness and performance of the 'qsort2' and 'iqsort2' sorting methods in theSortingR
class.The
SortingRTest4
object is used to test the correctness and performance of the 'qsort2' and 'iqsort2' sorting methods in theSortingR
class. The sort is in decreasing order. - object SortingRTest5 extends App
The
SortingRTest5
object is used to test the correctness and performance of the 'selsort2' and 'iselsort2' sorting methods in theSortingR
class.The
SortingRTest5
object is used to test the correctness and performance of the 'selsort2' and 'iselsort2' sorting methods in theSortingR
class. The sort is in decreasing order. - object SortingS
The
SortingS
companion object provides shortcuts for calling methods from theSortingS
class. - object SortingSTest extends App
The
SortingSTest
object is used to test the correctness and performance of the 'median' and 'imedian' methods in theSortingS
class. - object SortingSTest2 extends App
The
SortingSTest2
object is used to test the correctness and performance of the 'qsort' and 'iqsort' sorting methods in theSortingS
class. - object SortingSTest3 extends App
The
SortingSTest3
object is used to test the correctness and performance of the 'selsort' and 'iselsort' sorting methods in theSortingS
class. - object SortingSTest4 extends App
The
SortingSTest4
object is used to test the correctness and performance of the 'qsort2' and 'iqsort2' sorting methods in theSortingS
class.The
SortingSTest4
object is used to test the correctness and performance of the 'qsort2' and 'iqsort2' sorting methods in theSortingS
class. The sort is in decreasing order. - object SortingSTest5 extends App
The
SortingSTest5
object is used to test the correctness and performance of the 'selsort2' and 'iselsort2' sorting methods in theSortingS
class.The
SortingSTest5
object is used to test the correctness and performance of the 'selsort2' and 'iselsort2' sorting methods in theSortingS
class. The sort is in decreasing order. - object SortingT
The
SortingT
companion object provides shortcuts for calling methods from theSortingT
class. - object SortingTTest extends App
The
SortingTTest
object is used to test the correctness and performance of the 'median' and 'imedian' methods in theSortingT
class. - object SortingTTest2 extends App
The
SortingTTest2
object is used to test the correctness and performance of the 'qsort' and 'iqsort' sorting methods in theSortingT
class. - object SortingTTest3 extends App
The
SortingTTest3
object is used to test the correctness and performance of the 'selsort' and 'iselsort' sorting methods in theSortingT
class. - object SortingTTest4 extends App
The
SortingTTest4
object is used to test the correctness and performance of the 'qsort2' and 'iqsort2' sorting methods in theSortingT
class.The
SortingTTest4
object is used to test the correctness and performance of the 'qsort2' and 'iqsort2' sorting methods in theSortingT
class. The sort is in decreasing order. - object SortingTTest5 extends App
The
SortingTTest5
object is used to test the correctness and performance of the 'selsort2' and 'iselsort2' sorting methods in theSortingT
class.The
SortingTTest5
object is used to test the correctness and performance of the 'selsort2' and 'iselsort2' sorting methods in theSortingT
class. The sort is in decreasing order. - object SortingTest extends App
The
SortingTest
object is used to test the correctness and performance of the methods in theSorting
class that find 'k'-medians.The
SortingTest
object is used to test the correctness and performance of the methods in theSorting
class that find 'k'-medians. > runMain scalation.util.SortingTest - object SortingTest2 extends App
The
SortingTest2
object is used to test the correctness and performance of the sorting methods in theSorting
class.The
SortingTest2
object is used to test the correctness and performance of the sorting methods in theSorting
class. > runMain scalation.util.SortingTest2 - object SortingTest3 extends App
The
SortingTest3
object is used to test the correctness of top-k (smallest) and bottom-k (largest) algorithms that are based on partial selection sort.The
SortingTest3
object is used to test the correctness of top-k (smallest) and bottom-k (largest) algorithms that are based on partial selection sort. > runMain scalation.util.SortingTest3 - object SortingTest4 extends App
The
SortingTest4
object is used to test Merge Sort.The
SortingTest4
object is used to test Merge Sort. > runMain scalation.util.SortingTest4 - object SpellCheck extends Error
The
SpellCheck
object is used to check the spelling in source code comments.The
SpellCheck
object is used to check the spelling in source code comments. If not using Linux, may need to replace path for 'DICTIONARY'. Note, okay to use '/' since the dictionary location is system-dependent anyway. - object SpellCheckTest extends App
The
SpellCheckTest
object is used to test theSpellCheck
object.The
SpellCheckTest
object is used to test theSpellCheck
object. run-main scalation.util.SpellCheckTest - object Swap
The
Swap
class provides a method to swap elements in anArray
orArrayBuffer
.The
Swap
class provides a method to swap elements in anArray
orArrayBuffer
. Note,ArrayBuffer
is resizable (similar to Java'sArrayList
). - object SwapTest extends App
This
SwapTest
is used to test theSwap
object.This
SwapTest
is used to test theSwap
object. > runMain scalation.util.SwapTest - object TestBreak extends App
The
TestBreak
object provides an example of how to use 'breaks' in Scala.The
TestBreak
object provides an example of how to use 'breaks' in Scala.- See also
http://daily-scala.blogspot.com/2010/04/breaks.html
http://www.scala-lang.org/archives/downloads/distrib/files/nightly/docs/library/scala/util/control/Breaks.html
- object Unicode
The
Unicode
object provides arrays to facilitate the use of Unicode.The
Unicode
object provides arrays to facilitate the use of Unicode. ScalaTion currently uses a few UTF-16 characters, see code below. Most UTF-16 characters are 2 bytes (16 bits). Extended characters are encoded in 4 bytes. ScalaTion limits characters to the range 'U+0000' to 'U+2bff'. Developers should test Unicode symbols here before trying them in the code.- See also
en.wikipedia.org/wiki/UTF-16
www.tamasoft.co.jp/en/general-info/unicode.html
en.wikipedia.org/wiki/List_of_Unicode_characters
arxiv.org/abs/1112.1751 ------------------------------------------------------------------------------ Classes using Unicode include the following:
scalation.analytics.Regression
scalation.linalgebra.bld.BldVector
scalation.math
(package object)scalation.math.Complex
scalation.math.Rational
scalation.math.Real
scalation.math.StrNum
scalation.columnar_db.Relation
- object UnicodeTest extends App
The
UnicodeTest
object is used to theUnicode
object.The
UnicodeTest
object is used to theUnicode
object. > runMain scalation.util.UnicodeTest - object Wildcard
The
Wildcard
object defines useful contants for theWildcard
class. - object WildcardTest extends App
The
WildcardTest
object is used to test theWildcard
class.The
WildcardTest
object is used to test theWildcard
class. > runMain scalation.util.WildcardTest