~ubuntu-branches/ubuntu/maverick/openturns/maverick

« back to all changes in this revision

Viewing changes to lib/test/t_GumbelCopulaFactory_std.cxx

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2008-11-18 06:32:22 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20081118063222-pa0qncclrerrqkg2
Tags: 0.12.2-1
* New upstream release
* Bug fix: "New upstream release available (0.12.2)", thanks to Jerome
  Robert (Closes: #506005).
* Applied patch by J. Robert.
* debian/control: build-depends on libxml2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//                                               -*- C++ -*-
 
2
/**
 
3
 *  @file  t_GumbelCopulaFactory_std.cxx
 
4
 *  @brief The test file of class GumbelCopula for standard methods
 
5
 *
 
6
 *  (C) Copyright 2005-2007 EDF-EADS-Phimeca
 
7
 *
 
8
 *  This library is free software; you can redistribute it and/or
 
9
 *  modify it under the terms of the GNU Lesser General Public
 
10
 *  License as published by the Free Software Foundation; either
 
11
 *  version 2.1 of the License.
 
12
 *
 
13
 *  This library is distributed in the hope that it will be useful
 
14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
16
 *  Lesser General Public License for more details.
 
17
 *
 
18
 *  You should have received a copy of the GNU Lesser General Public
 
19
 *  License along with this library; if not, write to the Free Software
 
20
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 
21
 *
 
22
 *  @author: $LastChangedBy$
 
23
 *  @date:   $LastChangedDate$
 
24
 *  Id:      $Id$
 
25
 */
 
26
#include <iostream>
 
27
#include "OT.hxx"
 
28
#include "OTtestcode.hxx"
 
29
#include "GumbelCopulaFactory.hxx"
 
30
#include "GumbelCopula.hxx"
 
31
#include "Distribution.hxx"
 
32
#include "NumericalSample.hxx"
 
33
#include "NumericalPoint.hxx"
 
34
 
 
35
using namespace OT;
 
36
using namespace OT::Test;
 
37
using namespace OT::Base::Stat;
 
38
using namespace OT::Base::Type;
 
39
using namespace OT::Uncertainty::Distribution;
 
40
using namespace OT::Uncertainty::Model;
 
41
 
 
42
 
 
43
int main(int argc, char *argv[])
 
44
{
 
45
  TESTPREAMBLE;
 
46
  setRandomGenerator();  
 
47
 
 
48
  try {
 
49
    GumbelCopula distribution(1.5);
 
50
    UnsignedLong size(1000);
 
51
    NumericalSample sample(distribution.getNumericalSample(size));
 
52
    GumbelCopulaFactory factory;
 
53
    Distribution estimatedDistribution(factory.buildImplementation(sample));
 
54
    std::cout << "Distribution          =" << distribution << std::endl;
 
55
    std::cout << "Estimated distribution=" << estimatedDistribution << std::endl;
 
56
  }
 
57
  catch (TestFailed & ex) {
 
58
    std::cerr << ex << std::endl;
 
59
    return ExitCode::Error;
 
60
  }
 
61
 
 
62
 
 
63
  return ExitCode::Success;
 
64
}