/* Copyright 2018 Michal Fratczak This file is part of habdec. habdec is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. habdec is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with habdec. If not, see . */ #include #include #include #include "CompressedVector.h" namespace habdec { // specialization: float --> double template<> template<> inline void CompressedVector::copyValues(const std::vector& rhs, double i_min, double i_max) { if(!rhs.size()) { values_.clear(); return; } values_.resize(rhs.size()); std::copy(rhs.begin(), rhs.end(), values_.begin()); } // specialization: double --> float template<> template<> inline void CompressedVector::copyValues(const std::vector& rhs, double i_min, double i_max) { // std::cout<<"specialization: double --> float"< unsigned char template<> template<> inline void CompressedVector::copyValues(const std::vector& rhs, double i_min, double i_max) { // std::cout<<"specialization: float --> unsigned char"<::max(); values_.push_back(v_out); } } // specialization: float --> uint16_t template<> template<> inline void CompressedVector::copyValues(const std::vector& rhs, double i_min, double i_max) { // std::cout<<"specialization: float --> uint16_t"<::max(); values_.push_back(v_out); } } // specialization: double --> unsigned char template<> template<> inline void CompressedVector::copyValues(const std::vector& rhs, double i_min, double i_max) { // std::cout<<"specialization: double --> unsigned char"<::max(); values_.push_back(v_out); } } // specialization: double --> uint16_t template<> template<> inline void CompressedVector::copyValues(const std::vector& rhs, double i_min, double i_max) { // std::cout<<"specialization: double --> uint16_t"<::max(); values_.push_back(v_out); } } // specialization: unsigned char --> float template<> template<> inline void CompressedVector::copyValues(const std::vector& rhs, double i_min, double i_max) { // std::cout<<"specialization: unsigned char --> float"<::max(); values_.push_back(rhs_v_0_1); } } // specialization: uint16_t --> float template<> template<> inline void CompressedVector::copyValues(const std::vector& rhs, double i_min, double i_max) { // std::cout<<"specialization: uint16_t --> float"<::max(); values_.push_back(rhs_v_0_1); } } // specialization: unsigned char --> double template<> template<> inline void CompressedVector::copyValues(const std::vector& rhs, double i_min, double i_max) { // std::cout<<"specialization: unsigned char --> double"<::max(); values_.push_back(rhs_v_0_1); } } // specialization: uint16_t --> double template<> template<> inline void CompressedVector::copyValues(const std::vector& rhs, double i_min, double i_max) { // std::cout<<"specialization: uint16_t --> double"<::max(); values_.push_back(rhs_v_0_1); } } } // namespace habdec