//objective.h
//this example file declares the functions as required
// Liz Dolan, P.L. (Anne) Shepherd, Virginia Torczon
// College of William and Mary

#if !defined _userfile_
#define _userfile_


#include "vec.h"   
#include <cmath>
#include <iostream>
#include <unistd.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <stdio.h>


//Chris Siefert's Bound struct--used for constrained problems
struct Bound {
  Vector<double> lower;
  Vector<double> upper;
};

void fcn(long, Vector<double> &, double &, bool &, void *);

void fcn_2(long, Vector<double> &, double &, bool &, void *);

void fcn_eval(long vars, Vector<double> &x, double & f, bool & flag,
              void * nothing);

void parab_fcn(long, Vector<double> &, double &, bool &, void *);

double mySin(Vector<double> &);

double myCos(Vector<double> &);

double eval_parab(Vector<double> &);

void mcKinnon(long vars, Vector<double> & x, double & f,
	      bool & flag, void * nothing);

void avriel1(long vars, Vector<double> &x,
	     double & f, bool & flag, void* nothing);

void ComputeGradient1(long vars, Vector<double> & x,
		      Vector<double> & gradient, bool & defined);

void ill_conditioned_avriel1(long vars, Vector<double> &x,
			     double & f, bool & flag, void* nothing);

void ComputeGradient_ill_conditioned_1(long vars, Vector<double> & x,
				       Vector<double> & gradient, 
				       bool & defined);

void avriel2(long vars, Vector<double> &x,
	     double & f, bool & flag, void* nothing);

void ComputeGradient2(long vars, Vector<double> & x,
		      Vector<double> & gradient, bool & defined);

void beale(long vars, Vector<double> &x,
	   double & f, bool & flag, void* nothing);

void box(long vars, Vector<double> &x,
	 double & f, bool & flag, void* nothing);

void brown(long vars, Vector<double> &x,
	   double & f, bool & flag, void* nothing);

void helical(long vars, Vector<double> &x,
	     double & f, bool & flag, void* nothing);

void penalty1(long vars, Vector<double> &x,
	      double & f, bool & flag, void* nothing);

void powell(long vars, Vector<double> &x,
	    double & f, bool & flag, void* nothing);

void powell_badly_scaled(long vars, Vector<double> &x,
			 double & f, bool & flag, void* nothing);

void rosenbrock(long vars, Vector<double> &x,
		double & f, bool & flag, void* nothing);

void strict(long vars, Vector<double> &x,
	    double & f, bool & flag, void* nothing);

void trigonometric(long vars, Vector<double> &x,
		   double & f, bool & flag, void* nothing);

void variable(long vars, Vector<double> &x,
	      double & f, bool & flag, void* nothing);

void watson(long vars, Vector<double> &x,
	    double & f, bool & flag, void* nothing);

void wood(long vars, Vector<double> &x,
	  double & f, bool & flag, void* nothing);

void xTx(long vars, Vector<double> &x,
	 double & f, bool & flag, void* nothing);
#endif


