void VectorSpaceTesterSetOptions::setOption(
  int option_num, const std::string& option_value )
{
  using OptionsFromStreamPack::StringToBool;
  typedef VectorSpaceTester target_t;
  switch( (local_EOptions)option_num ) {
    case PRINT_ALL_TESTS:
      target().print_all_tests(
        StringToBool( "print_all_tests", option_value.c_str() )
        );
      break;
    case PRINT_VECTORS:
      target().print_vectors(
        StringToBool( "print_vectors", option_value.c_str() )
        );
      break;
    case TEST_FOR_EXCEPTION:
      target().throw_exception(
        StringToBool( "throw_exception", option_value.c_str() )
        );
      break;
      case NUM_RANDOM_TESTS:
      target().num_random_tests(std::abs(std::atoi(option_value.c_str())));
      break;
      case WARNING_TOL:
      target().warning_tol(std::abs(std::atof(option_value.c_str())));
      break;
      case ERROR_TOL:
      target().error_tol(std::abs(std::atof(option_value.c_str())));
      break;
    default:
      TEST_FOR_EXCEPT(true);	// Local error only?
  }
}
void DecompositionSystemTesterSetOptions::setOption(
  int option_num, const std::string& option_value )
{
  using OptionsFromStreamPack::StringToBool;
  typedef DecompositionSystemTester target_t;
  switch( (local_EOptions)option_num ) {
    case PRINT_TESTS:
    {
      const std::string &option = option_value.c_str();
      if( option == "PRINT_NONE" )
        target().print_tests( target_t::PRINT_NONE );
        else if( option == "PRINT_BASIC" )
        target().print_tests( target_t::PRINT_BASIC );
        else if( option == "PRINT_MORE" )
        target().print_tests( target_t::PRINT_MORE );
        else if( option == "PRINT_ALL" )
        target().print_tests( target_t::PRINT_ALL );
      else
        TEST_FOR_EXCEPTION(
          true, std::invalid_argument
          ,"Error, incorrect value for "
          "\"print_tests\".  Only the options "
          "PRINT_NONE, PRINT_BASIS, PRINT_MORE and PRINT_ALL are allowed" );
      break;
    }
    case DUMP_ALL:
      target().dump_all(
        StringToBool( "dump_all", option_value.c_str() )
        );
      break;
    case TEST_FOR_EXCEPTION:
      target().throw_exception(
        StringToBool( "throw_exception", option_value.c_str() )
        );
      break;
      case NUM_RANDOM_TESTS:
      target().num_random_tests(std::abs(std::atoi(option_value.c_str())));
      break;
      case MULT_WARNING_TOL:
      target().mult_warning_tol(std::fabs(std::atof(option_value.c_str())));
      break;
      case MULT_ERROR_TOL:
      target().mult_error_tol(std::fabs(std::atof(option_value.c_str())));
      break;
      case SOLVE_WARNING_TOL:
      target().solve_warning_tol(std::fabs(std::atof(option_value.c_str())));
      break;
      case SOLVE_ERROR_TOL:
      target().solve_error_tol(std::fabs(std::atof(option_value.c_str())));
      break;
    default:
      TEST_FOR_EXCEPT(true);	// Local error only?
  }
}
void QPSolverRelaxedQPSchurSetOptions::setOption(
    int option_num, const std::string& option_value )
{
    using OptionsFromStreamPack::StringToBool;
    typedef QPSolverRelaxedQPSchur target_t;
    typedef QPSchurPack::ConstraintsRelaxedStd constr_t;
    switch( (local_EOptions)option_num ) {
    case MAX_QP_ITER_FRAC:
        target().max_qp_iter_frac(std::fabs(std::atof(option_value.c_str())));
        break;
    case MAX_REAL_RUNTIME:
        target().max_real_runtime(std::fabs(std::atof(option_value.c_str())));
        break;
    case INEQUALITY_PICK_POLICY:
        if(			option_value == "ADD_BOUNDS_THEN_MOST_VIOLATED_INEQUALITY" )
            target().inequality_pick_policy( constr_t::ADD_BOUNDS_THEN_MOST_VIOLATED_INEQUALITY );
        else if(	option_value == "ADD_BOUNDS_THEN_FIRST_VIOLATED_INEQUALITY" )
            target().inequality_pick_policy( constr_t::ADD_BOUNDS_THEN_FIRST_VIOLATED_INEQUALITY );
        else if(	option_value == "ADD_MOST_VIOLATED_BOUNDS_AND_INEQUALITY" )
            target().inequality_pick_policy( constr_t::ADD_MOST_VIOLATED_BOUNDS_AND_INEQUALITY );
        else
            throw std::invalid_argument( "QPSolverRelaxedQPSchurSetOptions::"
                                         "setOption(...) : Error, only the values of\n"
                                         " ADD_BOUNDS_THEN_MOST_VIOLATED_INEQUALITY\n"
                                         ", ADD_BOUNDS_THEN_FIRST_VIOLATED_INEQUALITY and"
                                         " ADD_MOST_VIOLATED_BOUNDS_AND_INEQUALITY \nare valid for the option"
                                         " \"QPSolverRelaxedQPSchur::inequality_pick_policy\"" );
        break;
    case BOUND_TOL:
        target().bounds_tol(std::fabs(std::atof(option_value.c_str())));
        break;
    case INEQUALITY_TOL:
        target().inequality_tol(std::fabs(std::atof(option_value.c_str())));
        break;
    case EQUALITY_TOL:
        target().equality_tol(std::fabs(std::atof(option_value.c_str())));
        break;
    case LOOSE_FEAS_TOL:
        target().loose_feas_tol(std::fabs(std::atof(option_value.c_str())));
        break;
    case DUAL_INFEAS_TOL:
        target().dual_infeas_tol(std::fabs(std::atof(option_value.c_str())));
        break;
    case HUGE_PRIMAL_STEP:
        target().huge_primal_step(std::fabs(std::atof(option_value.c_str())));
        break;
    case HUGE_DUAL_STEP:
        target().huge_dual_step(std::fabs(std::atof(option_value.c_str())));
        break;
    case BIGM:
        target().bigM(std::fabs(std::atof(option_value.c_str())));
        break;
    case WARNING_TOL:
        target().warning_tol(std::fabs(std::atof(option_value.c_str())));
        break;
    case ERROR_TOL:
        target().error_tol(std::fabs(std::atof(option_value.c_str())));
        break;

    case ITER_REFINE_MIN_ITER:
        target().iter_refine_min_iter(std::abs(std::atoi(option_value.c_str())));
        break;
    case ITER_REFINE_MAX_ITER:
        target().iter_refine_max_iter(std::abs(std::atoi(option_value.c_str())));
        break;
    case ITER_REFINE_OPT_TOL:
        target().iter_refine_opt_tol(std::fabs(std::atof(option_value.c_str())));
        break;
    case ITER_REFINE_FEAS_TOL:
        target().iter_refine_feas_tol(std::fabs(std::atof(option_value.c_str())));
        break;
    case ITER_REFINE_AT_SOLUTION:
        target().iter_refine_at_solution(StringToBool( "iter_refine_at_solution", option_value.c_str() ));
        break;
    case PIVOT_WARNING_TOL:
        target().pivot_warning_tol(std::fabs(std::atof(option_value.c_str())));
        break;
    case PIVOT_SINGULAR_TOL:
        target().pivot_singular_tol(std::fabs(std::atof(option_value.c_str())));
        break;
    case PIVOT_WRONG_INERTIA_TOL:
        target().pivot_wrong_inertia_tol(std::fabs(std::atof(option_value.c_str())));
        break;
    case PRINT_LEVEL:
        if(			option_value == "USE_INPUT_ARG" )
            target().print_level( target_t::USE_INPUT_ARG );
        else if(	option_value == "NO_OUTPUT" )
            target().print_level( target_t::NO_OUTPUT );
        else if(	option_value == "OUTPUT_BASIC_INFO" )
            target().print_level( target_t::OUTPUT_BASIC_INFO );
        else if(	option_value == "OUTPUT_ITER_SUMMARY" )
            target().print_level( target_t::OUTPUT_ITER_SUMMARY );
        else if(	option_value == "OUTPUT_ITER_STEPS" )
            target().print_level( target_t::OUTPUT_ITER_STEPS );
        else if(	option_value == "OUTPUT_ACT_SET" )
            target().print_level( target_t::OUTPUT_ACT_SET );
        else if(	option_value == "OUTPUT_ITER_QUANTITIES" )
            target().print_level( target_t::OUTPUT_ITER_QUANTITIES );
        else
            throw std::invalid_argument( "QPSolverRelaxedQPSchurSetOptions::"
                                         "setOption(...) : Error, only the values of USE_INPUT_ARG, NO_OUTPUT"
                                         ", OUTPUT_BASIC_INFO, OUTPUT_ITER_SUMMARY\n"
                                         ", OUTPUT_ITER_STEPS, OUTPUT_ACT_SET and"
                                         " OUTPUT_ITER_QUANTITIES \nare valid for the option"
                                         " \"QPSolverRelaxedQPSchur::print_level\"" );
        break;
    default:
        TEUCHOS_TEST_FOR_EXCEPT(true);	// Local error only?
    }
}