MetricKnn API
Fast Similarity Search using the Metric Space Approach
mknn_printer.hpp
1 /*
2  * Copyright (C) 2012-2015, Juan Manuel Barrios <juanmanuel@barrios.cl>
3  * All rights reserved.
4  *
5  * This file is part of MetricKnn.
6  * MetricKnn is made available under the terms of the BSD 2-Clause License.
7  */
8 
9 #ifndef MKNN_PRINTER_HPP_
10 #define MKNN_PRINTER_HPP_
11 
12 #include "../metricknn_cpp.hpp"
13 
14 namespace mknn {
15 
20 class Printer {
21 public:
28  static Printer newPrinter(Domain domain);
29 
35  std::string objectToString(void *object);
36 
44  void setVectorFormat(std::string vector_prefix,
45  std::string dimension_separator, std::string vector_suffix);
46 
54  void setMultiobjectFormat(std::string prefix, std::string separator,
55  std::string suffix);
56 
60  Printer();
64  virtual ~Printer();
68  Printer(const Printer &other);
72  Printer &operator=(const Printer &other);
73 
74 protected:
78  class Impl;
82  std::unique_ptr<Impl> pimpl;
83 };
84 
85 }
86 #endif
std::string objectToString(void *object)
Creates a new string.
void setVectorFormat(std::string vector_prefix, std::string dimension_separator, std::string vector_suffix)
Changes the format for objects of the general domain vector.
static Printer newPrinter(Domain domain)
Creates an empty object.
The object printer converts an object from a given domain to its string representation.
Definition: mknn_printer.hpp:20
std::unique_ptr< Impl > pimpl
Internal opaque class.
Definition: mknn_printer.hpp:78
void setMultiobjectFormat(std::string prefix, std::string separator, std::string suffix)
Changes the format for objects of the general domain multiobject.
Definition: mevaluation_answers.hpp:18
Printer()
Default constructor.
virtual ~Printer()
Default destructor.
A domain represents the type of object that are contained in a dataset.
Definition: mknn_domain.hpp:33
Printer & operator=(const Printer &other)
Assignment operator.
Powered by Download MetricKnn