File: QuantLib.java

package info (click to toggle)
quantlib-swig 0.9.0-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 58,200 kB
  • ctags: 105,353
  • sloc: cpp: 1,047,001; ansic: 133,430; ml: 54,990; cs: 34,216; java: 23,659; perl: 17,882; python: 8,891; lisp: 2,337; ruby: 1,140; sh: 458; makefile: 355
file content (52 lines) | stat: -rw-r--r-- 4,130 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.33
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package org.quantlib;

public class QuantLib {
  public static Matrix transpose(Matrix m) {
    return new Matrix(QuantLibJNI.transpose(Matrix.getCPtr(m), m), true);
  }

  public static Matrix outerProduct(Array v1, Array v2) {
    return new Matrix(QuantLibJNI.outerProduct(Array.getCPtr(v1), v1, Array.getCPtr(v2), v2), true);
  }

  public static Matrix pseudoSqrt(Matrix m, SalvagingAlgorithm.Type a) {
    return new Matrix(QuantLibJNI.pseudoSqrt(Matrix.getCPtr(m), m, a.swigValue()), true);
  }

  public static int nullInt() {
    return QuantLibJNI.nullInt();
  }

  public static double nullDouble() {
    return QuantLibJNI.nullDouble();
  }

  public static Leg FixedRateLeg(Schedule schedule, DayCounter dayCount, DoubleVector nominals, DoubleVector couponRates, BusinessDayConvention paymentAdjustment, DayCounter firstPeriodDayCount) {
    return new Leg(QuantLibJNI.FixedRateLeg(Schedule.getCPtr(schedule), schedule, DayCounter.getCPtr(dayCount), dayCount, DoubleVector.getCPtr(nominals), nominals, DoubleVector.getCPtr(couponRates), couponRates, paymentAdjustment.swigValue(), DayCounter.getCPtr(firstPeriodDayCount), firstPeriodDayCount), true);
  }

  public static Leg IborLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, SWIGTYPE_p_std__vectorTunsigned_int_t fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, boolean isInArrears) {
    return new Leg(QuantLibJNI.IborLeg(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), SWIGTYPE_p_std__vectorTunsigned_int_t.getCPtr(fixingDays), DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, isInArrears), true);
  }

  public static Leg CmsLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, SWIGTYPE_p_std__vectorTunsigned_int_t fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, boolean isInArrears) {
    return new Leg(QuantLibJNI.CmsLeg(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), SWIGTYPE_p_std__vectorTunsigned_int_t.getCPtr(fixingDays), DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, isInArrears), true);
  }

  public static Leg CmsZeroLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, SWIGTYPE_p_std__vectorTunsigned_int_t fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors) {
    return new Leg(QuantLibJNI.CmsZeroLeg(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), SWIGTYPE_p_std__vectorTunsigned_int_t.getCPtr(fixingDays), DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors), true);
  }

  public static Matrix getCovariance(Array volatilities, Matrix correlations) {
    return new Matrix(QuantLibJNI.getCovariance(Array.getCPtr(volatilities), volatilities, Matrix.getCPtr(correlations), correlations), true);
  }

}