- Compiling and dependencies
- Premake is used as build system (http://industriousone.com/premake). Run premake gmake in the main directory to create a Makefile for GCC Make in ./build. Some classes depend on the graph framework Lemon (http://lemon.cs.elte.hu/).
- Naming conventions
- Suffixes used to group classes:
- ...Provider
Abstract base class. Classes providing funcationality derive from Providers. Example:
- ProxyProvider
- SolutionProvider
- ...Solution
Data structure. Encapsulated computation solutions returned by algorithms. Example:
- PartitionSolution
- DoubleSolution
- Required lifetime guarantees for paramters passed to CluE classes
- An object passed to a non-const method (e.g. setter) as a pointer will be copied if necessary, unless it is an input object (e.g. points, proxies, ...) and except where otherwise stated.
Examples:
- setMeasure(DissimilarityMeasure<T> const *measure) will copy measure.
- setInput(vector<T> const *proxies) will propably not copy proxies or any T object.
- setInput(vector<T*> const *input) will propably not copy input or any T* pointer / T object.
In other words, when passed by a pointer
- objects containing logic will be copied if necessary,
- data structures will (propably) not.
This was decided on the basis that data structures might consume lots of memory.
- Cloning objects
- Some classes provide a clone() method which should be used when copying objects passed by a pointer to avoid slicing effects.
Example:
- DissimilarityMeasure<T>* clone() const
- Unboxing objects
- Some classes provide a static toType() method to unbox pointers.
Example:
- static ProxyProvider<T>* toProxyProvider(SolutionProvider* s)