text: /*******************************************************************************
   * Copyright 2013-2014 Sebastian Niemann <niemann@sra.uni-hannover.de>.
   *
   * Licensed under the MIT License (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   * http://opensource.org/licenses/MIT
   *
   * Developers:
   *   Sebastian Niemann - Lead developer
   *   Daniel Kiechle - Unit testing
   ******************************************************************************/
  #include <Expected.hpp>
  using armadilloJava::Expected;
  
  #include <iostream>
  using std::cout;
  using std::endl;
  
  #include <utility>
  using std::pair;
  
  #include <armadillo>
  using arma::Col;
  using arma::pow;
  
  #include <InputClass.hpp>
  using armadilloJava::InputClass;
  
  #include <Input.hpp>
  using armadilloJava::Input;
  
  namespace armadilloJava {
    class ExpectedGenColVecExp : public Expected {
      public:
        ExpectedGenColVecExp() {
          cout << "Compute ExpectedGenColVecExp(): " << endl;
  
          vector<vector<pair<string, void*>>> inputs = Input::getTestParameters({
            InputClass::GenColVec,
            InputClass::Exp
          });
  
          for (vector<pair<string, void*>> input : inputs) {
            _fileSuffix = "";
  
            int n = 0;
            for (pair<string, void*> value : input) {
              switch (n) {
                case 0:
                  _fileSuffix += value.first;
                  _genColVec = *static_cast<Col<double>*>(value.second);
                  break;
                case 1:
                  _fileSuffix += "," + value.first;
                  _exp = *static_cast<double*>(value.second);
                  break;
              }
              ++n;
            }
  
            cout << "Using input: " << _fileSuffix << endl;
  
            expectedArmaPow();
          }
  
          cout << "done." << endl;
        }
  
      protected:
        Col<double> _genColVec;
        double _exp;
  
        void expectedArmaPow() {
          cout << "- Compute expectedArmaPow() ... ";
          save<double>("Arma.pow", pow(_genColVec, _exp));
          cout << "done." << endl;
        }
  
    };
  }
  