MetricKnn API
Fast Similarity Search using the Metric Space Approach
Functions
mknn_printer.h File Reference

A MknnPrinter converts an object from a given domain to its string representation. More...

#include "../metricknn_c.h"

Go to the source code of this file.

Functions

MknnPrintermknn_printer_new (MknnDomain *domain)
 Creates an empty object. More...
 
char * mknn_printer_objectToNewString (MknnPrinter *printer, void *object)
 Creates a new string. More...
 
void mknn_printer_setVectorFormat (MknnPrinter *printer, const char *vector_prefix, const char *dimension_separator, const char *vector_suffix)
 Changes the format for objects of the general domain vector. More...
 
void mknn_printer_setMultiobjectFormat (MknnPrinter *printer, const char *prefix, const char *separator, const char *suffix)
 Changes the format for objects of the general domain multiobject. More...
 
void mknn_printer_release (MknnPrinter *printer)
 Releases the printer. More...
 

Detailed Description

A MknnPrinter converts an object from a given domain to its string representation.

Function Documentation

MknnPrinter* mknn_printer_new ( MknnDomain domain)

Creates an empty object.

Parameters
domainthe domain of the objects
Returns
a new printer object.
char* mknn_printer_objectToNewString ( MknnPrinter printer,
void *  object 
)

Creates a new string.

Parameters
objectthe object to convert
printerthe printer object
Returns
a new string (must be freed)
void mknn_printer_release ( MknnPrinter printer)

Releases the printer.

Parameters
printer
void mknn_printer_setMultiobjectFormat ( MknnPrinter printer,
const char *  prefix,
const char *  separator,
const char *  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.
printerthe printer object
void mknn_printer_setVectorFormat ( MknnPrinter printer,
const char *  vector_prefix,
const char *  dimension_separator,
const char *  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.
printerthe printer object
Powered by Download MetricKnn