當前位置: 首頁>>代碼示例>>Java>>正文


Java Aggregator.getFunction方法代碼示例

本文整理匯總了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();
    }
 
開發者ID:optimatika,項目名稱:ojAlgo,代碼行數:34,代碼來源:BigDenseStore.java

示例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();
    }
 
開發者ID:optimatika,項目名稱:ojAlgo,代碼行數:34,代碼來源:GenericDenseStore.java

示例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();
    }
 
開發者ID:optimatika,項目名稱:ojAlgo,代碼行數:34,代碼來源:ComplexDenseStore.java

示例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();
    }
 
開發者ID:optimatika,項目名稱:ojAlgo,代碼行數:34,代碼來源:PrimitiveDenseStore.java

示例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();
    }
 
開發者ID:optimatika,項目名稱:ojAlgo,代碼行數:9,代碼來源:RawStore.java


注:本文中的org.ojalgo.function.aggregator.Aggregator.getFunction方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。