Tagged: Abstract Data Types

0

Phabstractic: Linked List Data Type

Doubly linked lists are important data structures for they enable a range of data to be stored in sequential order in memory without necessarily having to be spaced next to each other, or worry about a particular size. There are many advantages to storing data outside of an array like this, including the dynamic nature of its allocation and flexibility of editing the order of elements (including the addition and subtraction of elements).

0

Phabstractic: Map Data Type

Object stores, associative arrays, and Maps are important data structures. They are useful in statistical analysis, as well as for in memory database storage, such as a Redis implementation. The advantage of a map is that you don’t have to remember cryptic index values, as well it allows you to establish an abstract association between two data objects.

0

Phabstractic: Priority Queue Data Type

Priority Queues are very useful and usually, are implemented using heaps. This Priority Queue is implemented using an array that sorts itself rather than an overly complicated binary tree or heap. A priority queue is very useful for event-oriented programming, multitasking processes, and online message queues.

0

Phabstractic: Self-Sorting List Data Type

Self-sorting lists can be very handy. For instance, we could easily implement a priority queue by utilizing a sorted list, and that’s something we’re going to do, simply using the comparison method on competing priorities. Self-sorting arrays make putting everything in order in a messaging queue fairly simple.

0

Phabstractic: Restricted Lists Data Types

Lists are very important pieces of software engineering and implementation. With a restrictions predicate we are able to ensure variables in PHP are specific types. If we combine these two things we get a restricted list.

0

Phabstractic: Stack Data Type

“In computer science, a stack is an abstract data type that serves as a collection of elements, with two principal operations: push, which adds an element to the collection, and pop, which removes the most recently added element that was not yet removed.”

0

Phabstractic: Queue Data Type

Queues are very important pieces of code.  They are used in numerous many places including web services, transactions, and multi-process operating systems.

0

Phabstractic: List Data Types

Lists are very important abstract data types, and are used in many many different applications. Stacks are often used with programming languages, and in fact some programming languages depend entirely on a stack, such as Postscript.

0

Phabstractic: Restricted Set Data Type

By combining the restrictions predicate and the set we are able to configure a Set that only holds certain objects and types. This means I can make a set of integers, or a set of nodes, or a set of whatever without fear that the set will hold anything else.

0

Phabstractic: Range Data Type

Predicate objects are an interesting concept, which could have many uses in functional programming, in mathematical polymorphism, in input validation, etc. Ranges are a specific version of a predicate object that tests if any given value is within the maximum and minimum range defined in the object.

0

Phabstractic: None Data Type

But what happens when you want to differentiate between false, 0, and null? Or in another context, what if you need a null value that is considered an object by the algorithm or language?

0

Primus2\Falcraft: New Data Type (tagged union)

IMPORTANT This code is obsolete and has moved to another project, asherwunk/phabstractic.  For more information on the most recent version see the current blog post. Primus/Falcraft now has support for a tagged union data type....