Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

swh:1:snp:e6d42e6731ce66e3c09de07ac49964c03139e990
  • Code
  • Branches (11)
  • Releases (5)
    • Branches
    • Releases
    • HEAD
    • refs/heads/T2
    • refs/heads/develop
    • refs/heads/developCI
    • refs/heads/developCI2
    • refs/heads/developCI3
    • refs/heads/gh-pages
    • refs/heads/master
    • refs/heads/newBuild
    • refs/tags/v0.1
    • refs/tags/v0.11
    • refs/tags/v0.4
    • v0.4.3
    • v0.4.2
    • v0.4.1
    • v0.3
    • v0.2
  • 1c75839
  • /
  • tests
  • /
  • OxTestData.h
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
content badge
swh:1:cnt:1e712245ed10e903564fd1031bbfea056e921bcc
directory badge
swh:1:dir:99971d799fcef81bbd81a6e21a8fc9a739bb29e8
revision badge
swh:1:rev:99932db9e71d31a76425d68eef7d5859523ca0e4
snapshot badge
swh:1:snp:e6d42e6731ce66e3c09de07ac49964c03139e990

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
Tip revision: 99932db9e71d31a76425d68eef7d5859523ca0e4 authored by Konrad Werys on 04 November 2019, 09:33:32 UTC
doc: changes in the documentation
Tip revision: 99932db
OxTestData.h
/*!
 * \file OxTestData.h
 * \author Konrad Werys
 * \date 2018/07/30
 */

#ifndef Tomato_OXTESTDATA_H
#define Tomato_OXTESTDATA_H

#include "TomatoParser.h"

#include "yaml.h"


namespace Ox {

    template< typename MeasureType >
    class TestData {

    public:

        TestData(char* filePath);

        virtual std::vector<MeasureType> getSignalMag() const { return _signalMag; }
        virtual std::vector<MeasureType> getSignalPha() const { return _signalPha; }
        virtual std::vector<MeasureType> getSigns()     const { return _signs; }
        virtual std::vector<MeasureType> getSignal()    const { return _signal; }
        virtual std::vector<MeasureType> getInvTimes()  const { return _invTimes; }
        virtual std::vector<MeasureType> getResultsMolli()      const { return _resultsMolli; }
        virtual std::vector<MeasureType> getResultsShmolli()    const { return _resultsShmolli; }
        virtual std::vector<MeasureType> getResultsTwoParam()   const { return _resultsTwoParam; }
        virtual std::vector<MeasureType> getResultsThreeParam() const { return _resultsThreeParam; }


        virtual const MeasureType* getSignalMagPtr() const {
            if (_signalMag.size() == 0) {
                throw std::runtime_error("Empty signalMag");
            }
            return &_signalMag.at(0);
        }
        virtual const MeasureType* getSignalPhaPtr() const {
            if (_signalPha.size() == 0) {
                throw std::runtime_error("Empty signalPha");
            }
            return &_signalPha.at(0);
        }
        virtual const MeasureType* getSignsPtr()     const {
            if (_signs.size() == 0) {
                throw std::runtime_error("Empty signs");
            }
            return &_signs.at(0);
        }
        virtual const MeasureType* getSignalPtr()    const {
            if (_signal.size() == 0) {
                throw std::runtime_error("Empty signal");
            }
            return &_signal.at(0);
        }
        virtual const MeasureType* getInvTimesPtr()  const {
            if (_invTimes.size() == 0) {
                throw std::runtime_error("Empty invTimes");
            }
            return &_invTimes.at(0);
        }
        virtual const MeasureType* getResultsMolliPtr()    const {
            if (_resultsMolli.size() == 0) {
                throw std::runtime_error("Empty resultsMolli");
            }
            return &_resultsMolli.at(0);
        }
        virtual const MeasureType* getResultsShmolliPtr()  const {
            if (_resultsShmolli.size() == 0) {
                throw std::runtime_error("Empty resultsShmolli");
            }
            return &_resultsShmolli.at(0);
        }
        virtual const MeasureType* getResultsTwoParamPtr()  const {
            if (_resultsTwoParam.size() == 0) {
                throw std::runtime_error("Empty resultsTwoParam");
            }
            return &_resultsTwoParam.at(0);
        }
        virtual const MeasureType* getResultsThreeParamPtr()  const {
            if (_resultsThreeParam.size() == 0) {
                throw std::runtime_error("Empty resultsThreeParam");
            }
            return &_resultsThreeParam.at(0);
        }

        virtual int getNSamples()  const { return _nSamples; }

        void copyStrVectorToMemberVector(std::vector<std::string> strVector, std::vector<MeasureType> &memberVector);

        void disp();

        template< typename TYPE >
        void printVector(std::vector<TYPE> myVector, std::string myVectorName);

    protected:
        int _nSamples;
        std::vector<MeasureType> _signalMag;
        std::vector<MeasureType> _signalPha;
        std::vector<MeasureType> _signal;
        std::vector<MeasureType> _signs;
        std::vector<MeasureType> _invTimes;

        std::vector<MeasureType> _resultsMolli;
        std::vector<MeasureType> _resultsShmolli;
        std::vector<MeasureType> _resultsTwoParam;
        std::vector<MeasureType> _resultsThreeParam;

        void calcSignal();
    };
} // namespace Ox

#include "OxTestData.hxx"

#endif //Tomato_OXTESTDATA_H

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API