AnyIntervalDerivativeComplexMatrix.java
/**
* Copyright (C) 2021 MKLab.org (Koga Laboratory)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.mklab.cga.derivative;
import org.mklab.cga.interval.matrix.IntervalComplexNumericalMatrix;
import org.mklab.cga.interval.matrix.IntervalRealNumericalMatrix;
import org.mklab.cga.interval.scalar.IntervalComplexNumericalScalar;
import org.mklab.cga.interval.scalar.IntervalRealNumericalScalar;
import org.mklab.nfc.matrix.ComplexNumericalMatrix;
import org.mklab.nfc.matrix.RealNumericalMatrix;
import org.mklab.nfc.scalar.ComplexNumericalScalar;
import org.mklab.nfc.scalar.RealNumericalScalar;
/**
* @param <RIS> 実区間スカラーの型
* @param <RIM> 実区間行列の型
* @param <CIS> 複素区間スカラーの型
* @param <CIM> 複素区間行列の型
* @param <RS> 実スカラーの型
* @param <RM> 実行列の型
* @param <CS> 複素スカラーの型
* @param <CM> 複素行列の型
* @author koga
* @version $Revision$, 2021/09/14
*/
public class AnyIntervalDerivativeComplexMatrix<RIS extends IntervalRealNumericalScalar<RIS,RIM,CIS,CIM,RS,RM,CS,CM>, RIM extends IntervalRealNumericalMatrix<RIS,RIM,CIS,CIM,RS,RM,CS,CM>, CIS extends IntervalComplexNumericalScalar<RIS,RIM,CIS,CIM,RS,RM,CS,CM>, CIM extends IntervalComplexNumericalMatrix<RIS,RIM,CIS,CIM,RS,RM,CS,CM>, RS extends RealNumericalScalar<RS,RM,CS,CM>, RM extends RealNumericalMatrix<RS,RM,CS,CM>, CS extends ComplexNumericalScalar<RS,RM,CS,CM>, CM extends ComplexNumericalMatrix<RS,RM,CS,CM> > extends AbstractIntervalDerivativeMatrix<AnyIntervalDerivativeComplexNumber<RIS,RIM,CIS,CIM,RS,RM,CS,CM>, AnyIntervalDerivativeComplexMatrix<RIS,RIM,CIS,CIM,RS,RM,CS,CM>, CIS, CIM, CS, CM> implements IntervalDerivativeComplexMatrix<AnyIntervalDerivativeRealNumber<RIS,RIM,CIS,CIM,RS,RM,CS,CM>, AnyIntervalDerivativeRealMatrix<RIS,RIM,CIS,CIM,RS,RM,CS,CM>,AnyIntervalDerivativeComplexNumber<RIS,RIM,CIS,CIM,RS,RM,CS,CM>, AnyIntervalDerivativeComplexMatrix<RIS,RIM,CIS,CIM,RS,RM,CS,CM>,RIS,RIM,CIS,CIM,RS,RM,CS,CM>{
/** */
private static final long serialVersionUID = 1L;
/**
* Creates {@link AnyIntervalDerivativeComplexMatrix}.
* @param elements elements
*/
public AnyIntervalDerivativeComplexMatrix(AnyIntervalDerivativeComplexNumber<RIS, RIM, CIS, CIM, RS, RM, CS, CM>[] elements) {
super(elements);
}
/**
* Creates {@link AnyIntervalDerivativeComplexMatrix}.
* @param elements elements
*/
public AnyIntervalDerivativeComplexMatrix(AnyIntervalDerivativeComplexNumber<RIS, RIM, CIS, CIM, RS, RM, CS, CM>[][] elements) {
super(elements);
}
/**
* Creates {@link AnyIntervalDerivativeComplexMatrix}.
* @param rowSize row size
* @param columnSize column size
* @param elements elements
*/
public AnyIntervalDerivativeComplexMatrix(int rowSize, int columnSize, AnyIntervalDerivativeComplexNumber<RIS, RIM, CIS, CIM, RS, RM, CS, CM>[][] elements) {
super(rowSize, columnSize, elements);
}
/**
* {@inheritDoc}
*/
public AnyIntervalDerivativeComplexMatrix<RIS, RIM, CIS, CIM, RS, RM, CS, CM> create(CIM matrix) {
AnyIntervalDerivativeComplexNumber<RIS, RIM, CIS, CIM, RS, RM, CS, CM>[][] elements = getElement(1, 1).createArray(matrix.getRowSize(), matrix.getColumnSize());
for (int i = 0; i < matrix.getRowSize(); i++) {
for (int j = 0; j < matrix.getColumnSize(); j++) {
elements[i][j] = getElement(1,1).create(matrix.getElement(i+1,j+1));
}
}
return new AnyIntervalDerivativeComplexMatrix<>(elements);
}
/**
* {@inheritDoc}
*/
public AnyIntervalDerivativeComplexMatrix<RIS, RIM, CIS, CIM, RS, RM, CS, CM> create(CIM x, CIM dx) {
AnyIntervalDerivativeComplexNumber<RIS, RIM, CIS, CIM, RS, RM,CS, CM>[][] elements = getElement(1, 1).createArray(x.getRowSize(), x.getColumnSize());
for (int i = 0; i < x.getRowSize(); i++) {
for (int j = 0; j < x.getColumnSize(); j++) {
elements[i][j] = getElement(1,1).create(x.getElement(i+1,j+1), dx.getElement(i+1,j+1));
}
}
return new AnyIntervalDerivativeComplexMatrix<>(elements);
}
}