001/* ---------------------------------------------------------------------------- 002 * This file was automatically generated by SWIG (https://www.swig.org). 003 * Version 4.1.1 004 * 005 * Do not make changes to this file unless you know what you are doing - modify 006 * the SWIG interface file instead. 007 * ----------------------------------------------------------------------------- */ 008 009package org.quantlib; 010 011public class TripleBandLinearOp extends FdmLinearOp implements org.quantlib.helpers.QuantLibJNIHelpers.AutoCloseable { 012 private transient long swigCPtr; 013 private transient boolean swigCMemOwnDerived; 014 015 protected TripleBandLinearOp(long cPtr, boolean cMemoryOwn) { 016 super(QuantLibJNI.TripleBandLinearOp_SWIGSmartPtrUpcast(cPtr), true); 017 swigCMemOwnDerived = cMemoryOwn; 018 swigCPtr = cPtr; 019 } 020 021 protected static long getCPtr(TripleBandLinearOp obj) { 022 return (obj == null) ? 0 : obj.swigCPtr; 023 } 024 025 protected void swigSetCMemOwn(boolean own) { 026 swigCMemOwnDerived = own; 027 super.swigSetCMemOwn(own); 028 } 029 030 @SuppressWarnings("deprecation") 031 protected void finalize() { 032 delete(); 033 } 034 035 public synchronized void delete() { 036 if (swigCPtr != 0) { 037 if (swigCMemOwnDerived) { 038 swigCMemOwnDerived = false; 039 QuantLibJNI.delete_TripleBandLinearOp(swigCPtr); 040 } 041 swigCPtr = 0; 042 } 043 super.delete(); 044 } 045 046 public TripleBandLinearOp(long direction, FdmMesher mesher) { 047 this(QuantLibJNI.new_TripleBandLinearOp(direction, FdmMesher.getCPtr(mesher), mesher), true); 048 } 049 050 public Array apply(Array r) { 051 return new Array(QuantLibJNI.TripleBandLinearOp_apply(swigCPtr, this, Array.getCPtr(r), r), true); 052 } 053 054 public Array solve_splitting(Array r, double a, double b) { 055 return new Array(QuantLibJNI.TripleBandLinearOp_solve_splitting__SWIG_0(swigCPtr, this, Array.getCPtr(r), r, a, b), true); 056 } 057 058 public Array solve_splitting(Array r, double a) { 059 return new Array(QuantLibJNI.TripleBandLinearOp_solve_splitting__SWIG_1(swigCPtr, this, Array.getCPtr(r), r, a), true); 060 } 061 062 public TripleBandLinearOp mult(Array u) { 063 return new TripleBandLinearOp(QuantLibJNI.TripleBandLinearOp_mult(swigCPtr, this, Array.getCPtr(u), u), true); 064 } 065 066 public TripleBandLinearOp multR(Array u) { 067 return new TripleBandLinearOp(QuantLibJNI.TripleBandLinearOp_multR(swigCPtr, this, Array.getCPtr(u), u), true); 068 } 069 070 public TripleBandLinearOp add(TripleBandLinearOp m) { 071 return new TripleBandLinearOp(QuantLibJNI.TripleBandLinearOp_add__SWIG_0(swigCPtr, this, TripleBandLinearOp.getCPtr(m), m), true); 072 } 073 074 public TripleBandLinearOp add(Array u) { 075 return new TripleBandLinearOp(QuantLibJNI.TripleBandLinearOp_add__SWIG_1(swigCPtr, this, Array.getCPtr(u), u), true); 076 } 077 078 public void axpyb(Array a, TripleBandLinearOp x, TripleBandLinearOp y, Array b) { 079 QuantLibJNI.TripleBandLinearOp_axpyb(swigCPtr, this, Array.getCPtr(a), a, TripleBandLinearOp.getCPtr(x), x, TripleBandLinearOp.getCPtr(y), y, Array.getCPtr(b), b); 080 } 081 082 public void swap(TripleBandLinearOp m) { 083 QuantLibJNI.TripleBandLinearOp_swap(swigCPtr, this, TripleBandLinearOp.getCPtr(m), m); 084 } 085 086}