Package org.pentaho.aggdes.algorithm.impl

Examples of org.pentaho.aggdes.algorithm.impl.MonteCarloAlgorithm


  public TileSuggester(Lattice lattice) {
    this.lattice = lattice;
  }

  public Iterable<? extends Lattice.Tile> tiles() {
    final Algorithm algorithm = new MonteCarloAlgorithm();
    final PrintWriter pw = new PrintWriter(System.out);
    final Progress progress = new ArgumentUtils.TextProgress(pw);
    final StatisticsProvider statisticsProvider =
        new StatisticsProviderImpl(lattice);
    final double f = statisticsProvider.getFactRowCount();
    final ImmutableMap<Parameter, Object> map =
        ImmutableMap.<Parameter, Object>of(
            Algorithm.ParameterEnum.timeLimitSeconds, 1,
            Algorithm.ParameterEnum.aggregateLimit, 3,
            Algorithm.ParameterEnum.costLimit, f * 5d);
    final SchemaImpl schema = new SchemaImpl(lattice, statisticsProvider);
    final Result result = algorithm.run(schema, map, progress);
    final ImmutableList.Builder<Lattice.Tile> tiles = ImmutableList.builder();
    for (Aggregate aggregate : result.getAggregates()) {
      System.out.println(aggregate);
      tiles.add(toTile(aggregate));
    }
View Full Code Here

TOP

Related Classes of org.pentaho.aggdes.algorithm.impl.MonteCarloAlgorithm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.