clustering.h 1.92 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
/* ALTA --- Analysis of Bidirectional Reflectance Distribution Functions

   Copyright (C) 2013, 2014 Inria

   This file is part of ALTA.

   This Source Code Form is subject to the terms of the Mozilla Public
   License, v. 2.0.  If a copy of the MPL was not distributed with this
   file, You can obtain one at http://mozilla.org/MPL/2.0/.  */

11 12 13
#pragma once

#include "common.h"
14
#include "params.h"
15 16 17

#include <vector>

18
#ifdef OLD
19 20 21 22 23 24
class clustering : public data
{
    public: // methods

        //! \brief constructor loading a full dimension data and clustering
        //! it into a low dimension one.
25
        clustering::clustering(const ptr<data> d, const arguments& args);
26

27 28 29
        //! \brief the clustering class can save a clustering to a file.
        virtual void save(const std::string& filename);

30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
        //! \brief the clustering class cannot load from a file. It requires
        //! a complete object to be created.
        virtual void load(const std::string& filename)
        {
            throw;
        }
        //! \brief the clustering class cannot load from a file. It requires
        //! a complete object to be created.
        virtual void load(const std::string& filename, const arguments& args)
        {
            throw;
        }

        //! \brief aces to data in linear order
        virtual vec get(int i) const ;
        //! \brief aces to data in linear order
        virtual vec operator[](int i) const ;

        //! \brief return the size of the data after clusterization
        int size() const;

        //! \brief get min input space values
        virtual vec min() const ;
        //! \brief get max input space values
        virtual vec max() const ;

    protected:
        std::vector<vec> _data;
        vec _min, _max;
};
60 61 62 63 64
#else
    template<class T> void clustering(const T* in_data , int nY, params::input in_param, params::input out_param, std::vector<vec>& out_data);
#endif

#include "clustering.cpp"