本文整理匯總了Java中org.ojalgo.function.aggregator.Aggregator.getFunction方法的典型用法代碼示例。如果您正苦於以下問題:Java Aggregator.getFunction方法的具體用法?Java Aggregator.getFunction怎麽用?Java Aggregator.getFunction使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.ojalgo.function.aggregator.Aggregator
的用法示例。
在下文中一共展示了Aggregator.getFunction方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: aggregateAll
import org.ojalgo.function.aggregator.Aggregator; //導入方法依賴的package包/類
public BigDecimal aggregateAll(final Aggregator aggregator) {
final int tmpRowDim = myRowDim;
final int tmpColDim = myColDim;
final AggregatorFunction<BigDecimal> tmpMainAggr = aggregator.getFunction(BigAggregator.getSet());
if (tmpColDim > AggregateAll.THRESHOLD) {
final DivideAndConquer tmpConquerer = new DivideAndConquer() {
@Override
public void conquer(final int aFirst, final int aLimit) {
final AggregatorFunction<BigDecimal> tmpPartAggr = aggregator.getFunction(BigAggregator.getSet());
BigDenseStore.this.visit(tmpRowDim * aFirst, tmpRowDim * aLimit, 1, tmpPartAggr);
synchronized (tmpMainAggr) {
tmpMainAggr.merge(tmpPartAggr.get());
}
}
};
tmpConquerer.invoke(0, tmpColDim, AggregateAll.THRESHOLD);
} else {
BigDenseStore.this.visit(0, this.size(), 1, tmpMainAggr);
}
return tmpMainAggr.get();
}
示例2: aggregateAll
import org.ojalgo.function.aggregator.Aggregator; //導入方法依賴的package包/類
public N aggregateAll(final Aggregator aggregator) {
final int tmpRowDim = myRowDim;
final int tmpColDim = myColDim;
final AggregatorFunction<N> tmpMainAggr = aggregator.getFunction(myFactory.aggregator());
if (tmpColDim > AggregateAll.THRESHOLD) {
final DivideAndConquer tmpConquerer = new DivideAndConquer() {
@Override
public void conquer(final int aFirst, final int aLimit) {
final AggregatorFunction<N> tmpPartAggr = aggregator.getFunction(myFactory.aggregator());
GenericDenseStore.this.visit(tmpRowDim * aFirst, tmpRowDim * aLimit, 1, tmpPartAggr);
synchronized (tmpMainAggr) {
tmpMainAggr.merge(tmpPartAggr.get());
}
}
};
tmpConquerer.invoke(0, tmpColDim, AggregateAll.THRESHOLD);
} else {
GenericDenseStore.this.visit(0, this.size(), 1, tmpMainAggr);
}
return tmpMainAggr.get();
}
示例3: aggregateAll
import org.ojalgo.function.aggregator.Aggregator; //導入方法依賴的package包/類
public ComplexNumber aggregateAll(final Aggregator aggregator) {
final int tmpRowDim = myRowDim;
final int tmpColDim = myColDim;
final AggregatorFunction<ComplexNumber> tmpMainAggr = aggregator.getFunction(ComplexAggregator.getSet());
if (tmpColDim > AggregateAll.THRESHOLD) {
final DivideAndConquer tmpConquerer = new DivideAndConquer() {
@Override
public void conquer(final int aFirst, final int aLimit) {
final AggregatorFunction<ComplexNumber> tmpPartAggr = aggregator.getFunction(ComplexAggregator.getSet());
ComplexDenseStore.this.visit(tmpRowDim * aFirst, tmpRowDim * aLimit, 1, tmpPartAggr);
synchronized (tmpMainAggr) {
tmpMainAggr.merge(tmpPartAggr.get());
}
}
};
tmpConquerer.invoke(0, tmpColDim, AggregateAll.THRESHOLD);
} else {
ComplexDenseStore.this.visit(0, this.size(), 1, tmpMainAggr);
}
return tmpMainAggr.get();
}
示例4: aggregateAll
import org.ojalgo.function.aggregator.Aggregator; //導入方法依賴的package包/類
public Double aggregateAll(final Aggregator aggregator) {
final int tmpRowDim = myRowDim;
final int tmpColDim = myColDim;
final AggregatorFunction<Double> tmpMainAggr = aggregator.getFunction(PrimitiveAggregator.getSet());
if (tmpColDim > AggregateAll.THRESHOLD) {
final DivideAndConquer tmpConquerer = new DivideAndConquer() {
@Override
public void conquer(final int first, final int limit) {
final AggregatorFunction<Double> tmpPartAggr = aggregator.getFunction(PrimitiveAggregator.getSet());
PrimitiveDenseStore.this.visit(tmpRowDim * first, tmpRowDim * limit, 1, tmpPartAggr);
synchronized (tmpMainAggr) {
tmpMainAggr.merge(tmpPartAggr.get());
}
}
};
tmpConquerer.invoke(0, tmpColDim, AggregateAll.THRESHOLD);
} else {
PrimitiveDenseStore.this.visit(0, this.size(), 1, tmpMainAggr);
}
return tmpMainAggr.get();
}
示例5: aggregateAll
import org.ojalgo.function.aggregator.Aggregator; //導入方法依賴的package包/類
public Double aggregateAll(final Aggregator aggregator) {
final AggregatorFunction<Double> tmpVisitor = aggregator.getFunction(PrimitiveAggregator.getSet());
this.visitAll(tmpVisitor);
return tmpVisitor.get();
}