plottestobjective.cpp

Go to the documentation of this file.
00001 #include "TestObjective.h"
00002 #include "TestObjective2.h"
00003 #include "VecMat.h"
00004 #include "NetCDFTools.h"
00005 #include <iostream>
00006 
00007 int main()
00008 {
00009         TestObjective Objective1;
00010         TestObjective2 Objective2;
00011         double minx = -1;
00012         double miny = -1;
00013         double deltax = 0.05;
00014         double deltay = 0.05;
00015         unsigned int xsteps = 41;
00016         unsigned int ysteps = 41;
00017         
00018         gplib::rmat o1vals(xsteps,ysteps), o2vals(xsteps,ysteps);
00019         gplib::rvec xvals(xsteps), yvals(ysteps);
00020         ttranscribed member(2);
00021         
00022         for (unsigned int i = 0; i < xsteps; ++i)
00023         {
00024                 member(0) = minx + deltax * i;
00025                 xvals(i) = minx + deltax * i;
00026                 for (unsigned int j = 0; j < xsteps; ++j)
00027                 {
00028                         yvals(i) = miny + deltay * i;
00029                         member(1) = miny + deltay * j;
00030                         o1vals(i,j) = Objective1.CalcPerformance(member) + 0.001;
00031                         o2vals(i,j) = Objective2.CalcPerformance(member) + 0.001;
00032                 }
00033         }
00034         Write2DDataAsNetCDF("o1.nc",o1vals, xvals, yvals);
00035         Write2DDataAsNetCDF("o2.nc",o2vals, xvals, yvals);
00036 }

Generated on Mon Sep 15 12:54:34 2008 for GPLIB++ by  doxygen 1.5.5