12.07.2015 Views

Multilevel Graph Clustering with Density-Based Quality Measures

Multilevel Graph Clustering with Density-Based Quality Measures

Multilevel Graph Clustering with Density-Based Quality Measures

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3 The Multi-Level Refinement AlgorithmIndexMapReadableVT:typenameKeySpaceIndexSpace+KeySpacePtr: typedef+value_type: typedef = VT+param_type: typedef = VT const &+reference: typedef = VT&+key_type: typedef = KeySpacePtr::key_type+get(key_type): param_type const+key_space(): KeySpacePtr+at(key_type): param_type constIndexMap+at(key): reference+put(key,value:param_type)VT:typenameChunkIndexMapVT:typenameKeySpace:IndexSpaceConstantDummyMap+value: value_typeVT:typenameKeySpace:IndexSpaceFigure 3.16: Index Maps: Class and Concept DiagramAs solution the implementation of the presented algorithms uses the concept ofindex spaces and index maps. For similar approaches see [29, 9]. Index spacescarry the structure <strong>with</strong>out considering additional properties. This is similar to acollection of array indices. Each index abstractly represents an object. Specificproperties of these objects are managed by index maps. These allow to read andwrite the data stored for an object using its index as access key. This approachbasically is an external variant of the decorator pattern. It is external because itdoes not wrap the single objects when extending them.Figure 3.15 contains a class diagram of the implemented index spaces and theirinterfaces. Basic spaces allow to iterate over the indices using the methods beginand end like in the C++ Standard Template Library (STL). The size in number ofentries can be queried using size. Grow-able and dynamic spaces allow to createand remove indices. Subspaces mask parts of an index space. This can be usedfor example to blend out removed entries or iterate over all entries <strong>with</strong> a commonproperty. For this purpose all index spaces hold a reference called super space totheir superset. The super space of a root space points to itself.The class RangeSpace is the simplest, most compact implementation. It describesa continuous range of indices from a lower to an upper bound. It is used when thisgrowing behavior suffices. In case it is necessary to remove indices from the space theclass RecycleSpace is used. It recycles removed indices later when new are created.Internally a BitSubspace is used which marks removed indices in a bitset. The classFilterSubspace allows to easily operate <strong>with</strong> subsets defined by a filter function. Thefilter is provided at instantiation as function object.Index maps, as shown in Figure 3.16, provide access to specific data stored for theobjects referred to by indices. Several maps can be created on the same index spaceand independently destroyed when they are no longer in use. The implementationsuse C++ templates to define the type of data to store. The index maps supply an54

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!