~ubuntu-branches/ubuntu/vivid/quantlib-swig/vivid

« back to all changes in this revision

Viewing changes to CSharp/csharp/KrugerCubic.cs

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2009-12-03 17:01:53 UTC
  • mfrom: (1.1.9 upstream) (2.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20091203170153-x5yrwybjsl2q11vw
* New upstream release

* debian/control: Updated Standards-Version: to current value

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ----------------------------------------------------------------------------
 
2
 * This file was automatically generated by SWIG (http://www.swig.org).
 
3
 * Version 1.3.40
 
4
 *
 
5
 * Do not make changes to this file unless you know what you are doing--modify
 
6
 * the SWIG interface file instead.
 
7
 * ----------------------------------------------------------------------------- */
 
8
 
 
9
namespace QuantLib {
 
10
 
 
11
using System;
 
12
using System.Runtime.InteropServices;
 
13
 
 
14
public class KrugerCubic : IDisposable {
 
15
  private HandleRef swigCPtr;
 
16
  protected bool swigCMemOwn;
 
17
 
 
18
  internal KrugerCubic(IntPtr cPtr, bool cMemoryOwn) {
 
19
    swigCMemOwn = cMemoryOwn;
 
20
    swigCPtr = new HandleRef(this, cPtr);
 
21
  }
 
22
 
 
23
  internal static HandleRef getCPtr(KrugerCubic obj) {
 
24
    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 
25
  }
 
26
 
 
27
  ~KrugerCubic() {
 
28
    Dispose();
 
29
  }
 
30
 
 
31
  public virtual void Dispose() {
 
32
    lock(this) {
 
33
      if (swigCPtr.Handle != IntPtr.Zero) {
 
34
        if (swigCMemOwn) {
 
35
          swigCMemOwn = false;
 
36
          NQuantLibcPINVOKE.delete_KrugerCubic(swigCPtr);
 
37
        }
 
38
        swigCPtr = new HandleRef(null, IntPtr.Zero);
 
39
      }
 
40
      GC.SuppressFinalize(this);
 
41
    }
 
42
  }
 
43
 
 
44
  public KrugerCubic(QlArray x, QlArray y) : this(NQuantLibcPINVOKE.new_KrugerCubic(QlArray.getCPtr(x), QlArray.getCPtr(y)), true) {
 
45
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
 
46
  }
 
47
 
 
48
  public double call(double x, bool allowExtrapolation) {
 
49
    double ret = NQuantLibcPINVOKE.KrugerCubic_call__SWIG_0(swigCPtr, x, allowExtrapolation);
 
50
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
 
51
    return ret;
 
52
  }
 
53
 
 
54
  public double call(double x) {
 
55
    double ret = NQuantLibcPINVOKE.KrugerCubic_call__SWIG_1(swigCPtr, x);
 
56
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
 
57
    return ret;
 
58
  }
 
59
 
 
60
  public double derivative(double x, bool extrapolate) {
 
61
    double ret = NQuantLibcPINVOKE.KrugerCubic_derivative__SWIG_0(swigCPtr, x, extrapolate);
 
62
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
 
63
    return ret;
 
64
  }
 
65
 
 
66
  public double derivative(double x) {
 
67
    double ret = NQuantLibcPINVOKE.KrugerCubic_derivative__SWIG_1(swigCPtr, x);
 
68
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
 
69
    return ret;
 
70
  }
 
71
 
 
72
  public double secondDerivative(double x, bool extrapolate) {
 
73
    double ret = NQuantLibcPINVOKE.KrugerCubic_secondDerivative__SWIG_0(swigCPtr, x, extrapolate);
 
74
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
 
75
    return ret;
 
76
  }
 
77
 
 
78
  public double secondDerivative(double x) {
 
79
    double ret = NQuantLibcPINVOKE.KrugerCubic_secondDerivative__SWIG_1(swigCPtr, x);
 
80
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
 
81
    return ret;
 
82
  }
 
83
 
 
84
  public double primitive(double x, bool extrapolate) {
 
85
    double ret = NQuantLibcPINVOKE.KrugerCubic_primitive__SWIG_0(swigCPtr, x, extrapolate);
 
86
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
 
87
    return ret;
 
88
  }
 
89
 
 
90
  public double primitive(double x) {
 
91
    double ret = NQuantLibcPINVOKE.KrugerCubic_primitive__SWIG_1(swigCPtr, x);
 
92
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
 
93
    return ret;
 
94
  }
 
95
 
 
96
}
 
97
 
 
98
}