-
Notifications
You must be signed in to change notification settings - Fork 0
/
datastructures.tex
23 lines (22 loc) · 1.59 KB
/
datastructures.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
\section{Data structures}
\begin{itemize}
\item Data structure classes to hold single properties (nodes and edges) were decoupled
from the graph and node classes by using a common interface for the ``storage''
classes. At each possible place, this interface is used instead of concrete classes
\item The common interface \texttt{IDataStructure} holds methods for all actions that
are necessary for common accesses, like \texttt{add}, \texttt{contains},
\texttt{remove}, \texttt{size},\ldots, and internally uses another data structures (eg.
\texttt{DArray} stores everything in an array, \texttt{DHashSet} in a hashset,\ldots)
\item Extended interfaces hold methods that are not available on all data structures,
like \texttt{getRandom}. A data structure that makes use of this constraint in the base
interface is a Bloom filter which probabilistically stores only flags for contained
elements, but not a pointer to the elements itself, for less memory consumption
\item The class \texttt{GraphDataStructure} holds the currently used storage classes for
the global edge and node lists, and the node-local edge lists.
\item Generating a new instance of a storage class is done through this class, using
Reflection such that the used storage class can be exchanged on runtime
\item Currently included data structures: pure array, \texttt{ArrayList},
\texttt{HashMap}, \texttt{HashSet}, \texttt{LinkedList}
\end{itemize}
This concept allows us to add more data structure classes and combine and exchange them
very easily, without having a cluttered namespace