MetricKnn API
Fast Similarity Search using the Metric Space Approach
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
mknn::Printer Class Reference

The object printer converts an object from a given domain to its string representation. More...

#include <mknn_printer.hpp>

Public Member Functions

std::string objectToString (void *object)
 Creates a new string. More...
 
void setVectorFormat (std::string vector_prefix, std::string dimension_separator, std::string vector_suffix)
 Changes the format for objects of the general domain vector. More...
 
void setMultiobjectFormat (std::string prefix, std::string separator, std::string suffix)
 Changes the format for objects of the general domain multiobject. More...
 
 Printer ()
 Default constructor.
 
virtual ~Printer ()
 Default destructor.
 
 Printer (const Printer &other)
 Copy constructor.
 
Printeroperator= (const Printer &other)
 Assignment operator.
 

Static Public Member Functions

static Printer newPrinter (Domain domain)
 Creates an empty object. More...
 

Protected Attributes

std::unique_ptr< Impl > pimpl
 Internal opaque class.
 

Detailed Description

The object printer converts an object from a given domain to its string representation.

Member Function Documentation

static Printer mknn::Printer::newPrinter ( Domain  domain)
static

Creates an empty object.

Parameters
domainthe domain of the objects
Returns
a new printer object.
std::string mknn::Printer::objectToString ( void *  object)

Creates a new string.

Parameters
objectthe object to convert
Returns
a new string (must be freed)
void mknn::Printer::setMultiobjectFormat ( std::string  prefix,
std::string  separator,
std::string  suffix 
)

Changes the format for objects of the general domain multiobject.

Parameters
prefixthe string that is print in front of the multiobject.
separatorthe string that is print between objects.
suffixthe string that is print after the multiobject.
void mknn::Printer::setVectorFormat ( std::string  vector_prefix,
std::string  dimension_separator,
std::string  vector_suffix 
)

Changes the format for objects of the general domain vector.

Parameters
vector_prefixthe string that is print in front of the vector.
dimension_separatorthe string that is print between dimensions.
vector_suffixthe string that is print after the vector.

The documentation for this class was generated from the following file:
Powered by Download MetricKnn