Business Objects
Quark Platform Documentation
Version 1.7.0_0
Business Objects

org.openquark.cal.module.Cal.Utilities
Class CAL_Accumulate.Functions

java.lang.Object
  extended by org.openquark.cal.module.Cal.Utilities.CAL_Accumulate.Functions
Enclosing class:
CAL_Accumulate

public static final class CAL_Accumulate.Functions
extends Object

This inner class (Functions) contains constants and methods related to binding to CAL functions in the Cal.Utilities.Accumulate module.


Field Summary
static QualifiedName accumulate
          Name binding for function: accumulate.
static QualifiedName accumulate1
          Name binding for function: accumulate1.
static QualifiedName accumulate2
          Name binding for function: accumulate2.
static QualifiedName accumulate2Strict
          Name binding for function: accumulate2Strict.
static QualifiedName accumulate3
          Name binding for function: accumulate3.
static QualifiedName accumulate3Strict
          Name binding for function: accumulate3Strict.
static QualifiedName accumulate4
          Name binding for function: accumulate4.
static QualifiedName accumulate4Strict
          Name binding for function: accumulate4Strict.
 
Constructor Summary
CAL_Accumulate.Functions()
           
 
Method Summary
static SourceModel.Expr accumulate(SourceModel.Expr accumulator, SourceModel.Expr finalizer, SourceModel.Expr runningValue, SourceModel.Expr converter, SourceModel.Expr values)
          Do an accumulation operation across a data set.
static SourceModel.Expr accumulate1(SourceModel.Expr accumulator, SourceModel.Expr values)
          accumulate1 takes a record describing the accumulator and a set of values to operate on.
static SourceModel.Expr accumulate2(SourceModel.Expr accumulators, SourceModel.Expr values)
          accumulate2 is lazy in each of the accumulated values.
static SourceModel.Expr accumulate2Strict(SourceModel.Expr accumulators, SourceModel.Expr values)
          accumulate2Strict calculates all accumulated values in a single pass over the data.
static SourceModel.Expr accumulate3(SourceModel.Expr accumulators, SourceModel.Expr values)
          accumulate3 is lazy in each of the accumulated values.
static SourceModel.Expr accumulate3Strict(SourceModel.Expr accumulators, SourceModel.Expr values)
          accumulate3Strict calculates all accumulated values in a single pass over the data.
static SourceModel.Expr accumulate4(SourceModel.Expr accumulators, SourceModel.Expr values)
          accumulate4 is lazy in each of the accumulated values.
static SourceModel.Expr accumulate4Strict(SourceModel.Expr accumulators, SourceModel.Expr values)
          accumulate4Strict calculates all accumulated values in a single pass over the data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

accumulate

public static final QualifiedName accumulate
Name binding for function: accumulate.

See Also:
accumulate(org.openquark.cal.compiler.SourceModel.Expr, org.openquark.cal.compiler.SourceModel.Expr, org.openquark.cal.compiler.SourceModel.Expr, org.openquark.cal.compiler.SourceModel.Expr, org.openquark.cal.compiler.SourceModel.Expr)

accumulate1

public static final QualifiedName accumulate1
Name binding for function: accumulate1.

See Also:
accumulate1(org.openquark.cal.compiler.SourceModel.Expr, org.openquark.cal.compiler.SourceModel.Expr)

accumulate2

public static final QualifiedName accumulate2
Name binding for function: accumulate2.

See Also:
accumulate2(org.openquark.cal.compiler.SourceModel.Expr, org.openquark.cal.compiler.SourceModel.Expr)

accumulate2Strict

public static final QualifiedName accumulate2Strict
Name binding for function: accumulate2Strict.

See Also:
accumulate2Strict(org.openquark.cal.compiler.SourceModel.Expr, org.openquark.cal.compiler.SourceModel.Expr)

accumulate3

public static final QualifiedName accumulate3
Name binding for function: accumulate3.

See Also:
accumulate3(org.openquark.cal.compiler.SourceModel.Expr, org.openquark.cal.compiler.SourceModel.Expr)

accumulate3Strict

public static final QualifiedName accumulate3Strict
Name binding for function: accumulate3Strict.

See Also:
accumulate3Strict(org.openquark.cal.compiler.SourceModel.Expr, org.openquark.cal.compiler.SourceModel.Expr)

accumulate4

public static final QualifiedName accumulate4
Name binding for function: accumulate4.

See Also:
accumulate4(org.openquark.cal.compiler.SourceModel.Expr, org.openquark.cal.compiler.SourceModel.Expr)

accumulate4Strict

public static final QualifiedName accumulate4Strict
Name binding for function: accumulate4Strict.

See Also:
accumulate4Strict(org.openquark.cal.compiler.SourceModel.Expr, org.openquark.cal.compiler.SourceModel.Expr)
Constructor Detail

CAL_Accumulate.Functions

public CAL_Accumulate.Functions()
Method Detail

accumulate

public static final SourceModel.Expr accumulate(SourceModel.Expr accumulator,
                                                SourceModel.Expr finalizer,
                                                SourceModel.Expr runningValue,
                                                SourceModel.Expr converter,
                                                SourceModel.Expr values)
Do an accumulation operation across a data set.

Parameters:
accumulator - (CAL type: a -> b -> a) function to apply at each data point
finalizer - (CAL type: a -> c) function that is applied to the result of applying func across the record set.
runningValue - (CAL type: a) current state of calculation
converter - (CAL type: d -> b) function that transforms an element of the data set to the type of data point func is expecting.
values - (CAL type: [d]) a list of values
Returns:
(CAL type: c)

accumulate1

public static final SourceModel.Expr accumulate1(SourceModel.Expr accumulator,
                                                 SourceModel.Expr values)
accumulate1 takes a record describing the accumulator and a set of values to operate on.

The record contains: accumulator, finalizer, runningValue, and converter The accumulator is applied to the running value and each data point. The finalizer is replied to the running value after the accumulator has been applied to all data points. The running value represents the current state of the accumulation. The converter is used to transform an individual value. Often it is used to extract a field from a record/tuple.

Cal.Utilities.Accumulate.accumulate2 takes a record containing two accumulator description records and so on for Cal.Utilities.Accumulate.accumulate3, etc.

Parameters:
accumulator - (CAL type: (a\accumulator, a\converter, a\finalizer, a\runningValue) => {a | accumulator :: b -> c -> b, converter :: d -> c, finalizer :: b -> e, runningValue :: b}) - the record containing the accumulator parts
values - (CAL type: [d]) - a Cal.Core.Prelude.List of values
Returns:
(CAL type: e)

accumulate2

public static final SourceModel.Expr accumulate2(SourceModel.Expr accumulators,
                                                 SourceModel.Expr values)
accumulate2 is lazy in each of the accumulated values. i.e. accessing one accumulated value doesn't cause the other value to be evaluated. As a result there are two passes over the data to get each value. Also the entire value record set ends up residing in memory. It takes a record containing two fields, #1 and #2, each of which are an accumulator description record as described in the comment for Cal.Utilities.Accumulate.accumulate1

Parameters:
accumulators - (CAL type: (a\#1, a\#2, b\accumulator, b\converter, b\finalizer, b\runningValue, g\accumulator, g\converter, g\finalizer, g\runningValue) => {a | #1 :: {b | accumulator :: c -> d -> c, converter :: e -> d, finalizer :: c -> f, runningValue :: c}, #2 :: {g | accumulator :: h -> i -> h, converter :: e -> i, finalizer :: h -> j, runningValue :: h}}) - a record containing the records containing the accumulator parts
values - (CAL type: [e]) - a Cal.Core.Prelude.List of values
Returns:
(CAL type: (f, j))

accumulate2Strict

public static final SourceModel.Expr accumulate2Strict(SourceModel.Expr accumulators,
                                                       SourceModel.Expr values)
accumulate2Strict calculates all accumulated values in a single pass over the data. This means that it runs in constant space and that it is not possible to access one value without both being calculated.

It takes a record containing two fields, #1 and #2, each of which are an accumulator description record as described in the comment for Cal.Utilities.Accumulate.accumulate1

Parameters:
accumulators - (CAL type: (a\#1, a\#2, b\accumulator, b\converter, b\finalizer, b\runningValue, g\accumulator, g\converter, g\finalizer, g\runningValue) => {a | #1 :: {b | accumulator :: c -> d -> c, converter :: e -> d, finalizer :: c -> f, runningValue :: c}, #2 :: {g | accumulator :: h -> i -> h, converter :: e -> i, finalizer :: h -> j, runningValue :: h}}) - a record containing the records containing the accumulator parts
values - (CAL type: [e]) - a Cal.Core.Prelude.List of values
Returns:
(CAL type: (f, j))

accumulate3

public static final SourceModel.Expr accumulate3(SourceModel.Expr accumulators,
                                                 SourceModel.Expr values)
accumulate3 is lazy in each of the accumulated values. i.e. accessing one accumulated value doesn't cause the other value to be evaluated. As a result there are three passes over the data if all values are accessed. Also the entire value record set ends up residing in memory.

Parameters:
accumulators - (CAL type: (a\#1, a\#2, a\#3, b\accumulator, b\converter, b\finalizer, b\runningValue, g\accumulator, g\converter, g\finalizer, g\runningValue, k\accumulator, k\converter, k\finalizer, k\runningValue) => {a | #1 :: {b | accumulator :: c -> d -> c, converter :: e -> d, finalizer :: c -> f, runningValue :: c}, #2 :: {g | accumulator :: h -> i -> h, converter :: e -> i, finalizer :: h -> j, runningValue :: h}, #3 :: {k | accumulator :: l -> m -> l, converter :: e -> m, finalizer :: l -> n, runningValue :: l}}) - a record containing the records containing the accumulator parts
values - (CAL type: [e]) - a Cal.Core.Prelude.List of values
Returns:
(CAL type: (f, j, n))

accumulate3Strict

public static final SourceModel.Expr accumulate3Strict(SourceModel.Expr accumulators,
                                                       SourceModel.Expr values)
accumulate3Strict calculates all accumulated values in a single pass over the data. This means that it runs in constant space and that it is not possible to access one accumulated value without all three being calculated.

Parameters:
accumulators - (CAL type: (a\#1, a\#2, a\#3, b\accumulator, b\converter, b\finalizer, b\runningValue, g\accumulator, g\converter, g\finalizer, g\runningValue, k\accumulator, k\converter, k\finalizer, k\runningValue) => {a | #1 :: {b | accumulator :: c -> d -> c, converter :: e -> d, finalizer :: c -> f, runningValue :: c}, #2 :: {g | accumulator :: h -> i -> h, converter :: e -> i, finalizer :: h -> j, runningValue :: h}, #3 :: {k | accumulator :: l -> m -> l, converter :: e -> m, finalizer :: l -> n, runningValue :: l}}) - a record containing the records containing the accumulator parts
values - (CAL type: [e]) - a Cal.Core.Prelude.List of values
Returns:
(CAL type: (f, j, n))

accumulate4

public static final SourceModel.Expr accumulate4(SourceModel.Expr accumulators,
                                                 SourceModel.Expr values)
accumulate4 is lazy in each of the accumulated values. i.e. accessing one accumulated value doesn't cause the other value to be evaluated. As a result there are four passes over the data if all accumulated values are accessed. Also the entire value record set ends up residing in memory.

Parameters:
accumulators - (CAL type: (a\#1, a\#2, a\#3, a\#4, b\accumulator, b\converter, b\finalizer, b\runningValue, g\accumulator, g\converter, g\finalizer, g\runningValue, k\accumulator, k\converter, k\finalizer, k\runningValue, o\accumulator, o\converter, o\finalizer, o\runningValue) => {a | #1 :: {b | accumulator :: c -> d -> c, converter :: e -> d, finalizer :: c -> f, runningValue :: c}, #2 :: {g | accumulator :: h -> i -> h, converter :: e -> i, finalizer :: h -> j, runningValue :: h}, #3 :: {k | accumulator :: l -> m -> l, converter :: e -> m, finalizer :: l -> n, runningValue :: l}, #4 :: {o | accumulator :: p -> q -> p, converter :: e -> q, finalizer :: p -> r, runningValue :: p}}) - a record containing the records containing the accumulator parts
values - (CAL type: [e]) - a Cal.Core.Prelude.List of values
Returns:
(CAL type: (f, j, n, r))

accumulate4Strict

public static final SourceModel.Expr accumulate4Strict(SourceModel.Expr accumulators,
                                                       SourceModel.Expr values)
accumulate4Strict calculates all accumulated values in a single pass over the data. This means that it runs in constant space and that it is not possible to access one accumulated value without all four being calculated.

Parameters:
accumulators - (CAL type: (a\#1, a\#2, a\#3, a\#4, b\accumulator, b\converter, b\finalizer, b\runningValue, g\accumulator, g\converter, g\finalizer, g\runningValue, k\accumulator, k\converter, k\finalizer, k\runningValue, o\accumulator, o\converter, o\finalizer, o\runningValue) => {a | #1 :: {b | accumulator :: c -> d -> c, converter :: e -> d, finalizer :: c -> f, runningValue :: c}, #2 :: {g | accumulator :: h -> i -> h, converter :: e -> i, finalizer :: h -> j, runningValue :: h}, #3 :: {k | accumulator :: l -> m -> l, converter :: e -> m, finalizer :: l -> n, runningValue :: l}, #4 :: {o | accumulator :: p -> q -> p, converter :: e -> q, finalizer :: p -> r, runningValue :: p}}) - a record containing the records containing the accumulator parts
values - (CAL type: [e]) - a Cal.Core.Prelude.List of values
Returns:
(CAL type: (f, j, n, r))

Business Objects
Quark Platform Documentation
Version 1.7.0_0
Business Objects

Copyright © 2007 Business Objects. All rights reserved.