use of org.ojalgo.concurrent.DivideAndConquer in project ojAlgo by optimatika.
the class BigDenseStore method transformLeft.
public void transformLeft(final Householder<BigDecimal> transformation, final int firstColumn) {
final Householder.Big tmpTransf = BigDenseStore.cast(transformation);
final BigDecimal[] tmpData = data;
final int tmpRowDim = myRowDim;
final int tmpColDim = myColDim;
if ((tmpColDim - firstColumn) > HouseholderLeft.THRESHOLD) {
final DivideAndConquer tmpConquerer = new DivideAndConquer() {
@Override
public void conquer(final int aFirst, final int aLimit) {
HouseholderLeft.invoke(tmpData, tmpRowDim, aFirst, aLimit, tmpTransf);
}
};
tmpConquerer.invoke(firstColumn, tmpColDim, HouseholderLeft.THRESHOLD);
} else {
HouseholderLeft.invoke(tmpData, tmpRowDim, firstColumn, tmpColDim, tmpTransf);
}
}
use of org.ojalgo.concurrent.DivideAndConquer in project ojAlgo by optimatika.
the class BigDenseStore method applyCholesky.
public void applyCholesky(final int iterationPoint, final BasicArray<BigDecimal> multipliers) {
final BigDecimal[] tmpData = data;
final BigDecimal[] tmpColumn = ((BigArray) multipliers).data;
if ((myColDim - iterationPoint - 1) > ApplyCholesky.THRESHOLD) {
final DivideAndConquer tmpConquerer = new DivideAndConquer() {
@Override
protected void conquer(final int aFirst, final int aLimit) {
ApplyCholesky.invoke(tmpData, myRowDim, aFirst, aLimit, tmpColumn);
}
};
tmpConquerer.invoke(iterationPoint + 1, myColDim, ApplyCholesky.THRESHOLD);
} else {
ApplyCholesky.invoke(tmpData, myRowDim, iterationPoint + 1, myColDim, tmpColumn);
}
}
use of org.ojalgo.concurrent.DivideAndConquer in project ojAlgo by optimatika.
the class BigDenseStore method applyLU.
public void applyLU(final int iterationPoint, final BasicArray<BigDecimal> multipliers) {
final BigDecimal[] tmpData = data;
final BigDecimal[] tmpColumn = ((BigArray) multipliers).data;
if ((myColDim - iterationPoint - 1) > ApplyLU.THRESHOLD) {
final DivideAndConquer tmpConquerer = new DivideAndConquer() {
@Override
protected void conquer(final int aFirst, final int aLimit) {
ApplyLU.invoke(tmpData, myRowDim, aFirst, aLimit, tmpColumn, iterationPoint);
}
};
tmpConquerer.invoke(iterationPoint + 1, myColDim, ApplyLU.THRESHOLD);
} else {
ApplyLU.invoke(tmpData, myRowDim, iterationPoint + 1, myColDim, tmpColumn, iterationPoint);
}
}
use of org.ojalgo.concurrent.DivideAndConquer in project ojAlgo by optimatika.
the class BigDenseStore method transformRight.
public void transformRight(final Householder<BigDecimal> transformation, final int firstRow) {
final Householder.Big tmpTransf = BigDenseStore.cast(transformation);
final BigDecimal[] tmpData = data;
final int tmpRowDim = myRowDim;
final int tmpColDim = myColDim;
if ((tmpRowDim - firstRow) > HouseholderRight.THRESHOLD) {
final DivideAndConquer tmpConquerer = new DivideAndConquer() {
@Override
public void conquer(final int aFirst, final int aLimit) {
HouseholderRight.invoke(tmpData, aFirst, aLimit, tmpColDim, tmpTransf);
}
};
tmpConquerer.invoke(firstRow, tmpRowDim, HouseholderRight.THRESHOLD);
} else {
HouseholderRight.invoke(tmpData, firstRow, tmpRowDim, tmpColDim, tmpTransf);
}
}
use of org.ojalgo.concurrent.DivideAndConquer in project ojAlgo by optimatika.
the class ComplexDenseStore method substituteBackwards.
public void substituteBackwards(final Access2D<ComplexNumber> body, final boolean unitDiagonal, final boolean conjugated, final boolean hermitian) {
final int tmpRowDim = myRowDim;
final int tmpColDim = myColDim;
if (tmpColDim > SubstituteBackwards.THRESHOLD) {
final DivideAndConquer tmpConquerer = new DivideAndConquer() {
@Override
public void conquer(final int aFirst, final int aLimit) {
SubstituteBackwards.invoke(ComplexDenseStore.this.data, tmpRowDim, aFirst, aLimit, body, unitDiagonal, conjugated, hermitian, FACTORY.scalar());
}
};
tmpConquerer.invoke(0, tmpColDim, SubstituteBackwards.THRESHOLD);
} else {
SubstituteBackwards.invoke(data, tmpRowDim, 0, tmpColDim, body, unitDiagonal, conjugated, hermitian, FACTORY.scalar());
}
}
Aggregations