Appendix B: Mapping of the Corresponding Analytics APIs

The following tables link analytics functions that are available in the indicated native language APIs:

Unary Operations

Produce a result sequence of the same type for operations: abs, neg, match

C
C++
SQL
Python
Java
C#
mco_seq_abs_TYPE()
abs()
seq_abs( input )
abs()
abs()
source.Abs()
mco_seq_neg_TYPE()
operator -
seq_neg( input )
neg()
neq()
-source
mco_seq_match()
match(char const* pattern)
match( pattern )
source.Match(string pattern)

Binary Operations

Produce a result sequence of the same type for operations: add, sub, mul, div, mod, max, min

C
C++
SQL
Python
Java
C#
mco_seq_add_TYPE()
operator +
seq_add( left, right )
add( input )
add( other )
left + right
mco_seq_sub_TYPE()
operator -
seq_sub( left, right )
sub( input )
sub( other )
left - right
mco_seq_mul_TYPE()
operator *
seq_mul( left, right )
mul( input )
mul( other )
left * right
mco_seq_div_TYPE()
operator /
seq_div( left, right )
div( input )
div( other )
left / right
mco_seq_mod_TYPE()
operator %
seq_mod( left, right )
mod( input )
mod( other )
left % right
mco_seq_max_TYPE()
max(Sequence<T> const& other)
max( input )
max( other )
Sequence.Max(left, right)
mco_seq_min_TYPE()
min(Sequence<T> const& other)
min( input )
min( other )
Sequence.Min(left, right)
seq_pow( left, right )
seq_maxof( left, right )
seq_minof( left, right )

Comparison Operations

Produce a result sequence of boolean values for the comparison operators: ==, !=, >, >=, <, <=

C
C++
SQL
Python
Java
C#
mco_seq_eq_TYPE()
operator ==
seq_eq( left, right )
eq( input )
eq( other )
left == right
mco_seq_ne_TYPE()
operator !=
seq_ne( left, right )
ne( input )
ne( other )
left != right
mco_seq_gt_TYPE()
operator >
seq_gt( left, right )
gt( input )
gt( other )
left > right
mco_seq_ge_TYPE()
operator >=
seq_ge( left, right )
ge( input )
ge( other )
left >= right
mco_seq_lt_TYPE()
operator <
seq_lt( left, right )
lt( input )
lt( other )
left < right
mco_seq_le_TYPE()
operator <=
seq_le( left, right )
le( input )
le( other )
left <= right

Logical Operations

Produce a result sequence of boolean values from the logical operators: not, and, or, xor

C
C++
SQL
Python
Java
C#
mco_seq_not()
operator !=
seq_not( input )
not()
not()
!source
mco_seq_and()
operator &&
seq_and( left, right )
and( input )
and( other )
left & right
mco_seq_or()
operator ||
mco_seq_or( left, right )
or( input )
or( other )
left | right
mco_seq_xor()
operator ^
mco_seq_xor( left, right )
xor( input )
xor( other )
left ^ right
mco_seq_TYPE1_to_TYPE2()
source.Cast(Type elemType)

Conversion Operations

Convert the sequence elements to the desired type

C
C++
SQL
Python
Java
C#
mco_seq_TYPE2_from_TYPE1()
source.Cast(Type elemType)
mco_seq_print_char()
Sequence.Parse(Connection con, string value, Type elemType)
seq_integer( input )
seq_real( input )
cast( typeid )
cast( type )
convert( typeid )

Collapse Operations

Collapse two sequences to scalar values such as: weighted sum, weighted average, covariance, correlation

C
C++
SQL
Python
Java
C#
mco_seq_wsum_TYPE()
wsum( weights )
seq_wsum( left, right )
wsum( input )
wsum( weights )
source.Wsum(weights)
mco_seq_wavg_TYPE()
wavg( weights )
seq_wavg( left, right )
wavg( input )
wavg( weights )
source.Wavg(weights)
mco_seq_cov_TYPE()
cov( other )
seq_cov( left, right )
cov( input )
cov( other )
Sequence.Cov(left, right)
mco_seq_corr_TYPE()
corr( other )
seq_corr( left, right )
corr( input )
corr( other )
Sequence.Corr(left, right)
var()
dev()

Conditional and Sequence Manipulator Operations

Perform operations on one or two input sequences based on a condition such as: if, iif, filter, filter_pos.

Perform various manipulations of input sequences.

C
C++
SQL
Python
Java
C#
mco_seq_iif_TYPE()
iif( then, else )
seq_iif( cond, then, else )
iif( then, else)
iif( then, otherwise, boolean lazy)
condition.If(thenSequence, otherwiseSequence, bool lazy)
mco_seq_if_TYPE()
cond( then, else )
seq_if( cond, then, else )
if( then, else)
condition.If(thenSequence, otherwiseSequence, bool lazy)
mco_seq_filter_TYPE()
filter( input )
seq_filter( cond, input )
filter( input )
filter( cond )
source.Filter(condition)
mco_seq_filter_pos()
filterPos()
seq_filter_pos( cond )

filter_pos()

filterPos()
condition.FilterPos()
mco_seq_filter_search()
mco_seq_filter_first_pos()
firstPosition()
lastPosition()
nextPosition()
mco_seq_reverse_TYPE()
reverse()
seq_reverse( input )
reverse()
reverse()
mco_seq_cat()
cat( other )
mco_seq_concat()
concat( other) also operator,
seq_concat( input1, input2 )
concat( input )
concat( tail )
seq_subseq( input, from, till )
mco_seq_limit_TYPE()
limit( from, till) also operator()
limit( from, till )
limit( from, till )
mco_seq_get_TYPE()
get( result )
get( [size] )
get( buffer )
mco_seq_get_nullable_TYPE()
mco_seq_unget_TYPE()
unget( input, elemtype [, elemsize] )
mco_seq_unget_nullable_TYPE()
mco_seq_uniq_TYPE()
unique()
seq_unique( input )
uniq()
unique()
mco_seq_norm_TYPE()
norm()
seq_norm( input )
norm()
normalize()
mco_seq_thin_TYPE()
thin( origin, step )
thin( origin, step )
thin( origin, step )
mco_seq_diff_TYPE()
diff()
seq_diff( input )
diff()
diff()
mco_seq_const_TYPE()
const( value, elemtype [,elemsize] )
constant( val, type )
mco_seq_trend_TYPE()
seq_trend( input )
trend()
trend()
seq_ceil( input )
seq_floor( input )
mco_seq_parse_TYPE()
mco_seq_join_TYPE()
join()
mco_seq_tee_TYPE()
tee()
tee()
mco_seq_union_TYPE()
combine( other, order )
mco_seq_skip_nan_TYPE()
mco_seq_map_TYPE()
map( positions) also operator[]
map( positions )
mco_seq_repeat_TYPE()
repeat( nTimes )
seq_repeat( n_times )
repeat( n_times )
repeat( count )
mco_seq_stretch_TS_TYPE_VAL_TYPE()
stretch( ts1, ts2, fille r)
seq_stretch()
stretch( ts1, ts2, filler)
mco_seq_stretch0_TS_TYPE_VAL_TYPE()
stretch0( ts1, ts2, filler )
seq_stretch0()
stretch0( ts1, ts2, filler)
mco_seq_asof_join_TS_TYPE_VAL_TYPE()
asofJoin( ts1, ts2 )
seq_asof_join()
asofJoin( ts1, ts2 )
mco_seq_cross_TYPE()
cross( first_cross_direction )
seq_cross()
cross( cross_direction )
cross( firstCrossDirection )
mco_seq_extrema_TYPE()
extrema( first_extremum )
seq_extrema()
extrema( first_extremum )
extrema( firstExtremum )
tonparray( field1, ... )
hash(), hash( other )

Iterator Operations

Extract values from and reset sequence iterators such as: next, reset

C
C++
SQL
Python
Java
C#
mco_seq_next_TYPE()
next( val ) also operator++
next()
next(), nextInt(), nextLong(), nextFloat(), nextBytes(), nextString(), nextDate()
mco_seq_reset_iterator()
reset()
reset()
reset()
mco_seq_reset_unary_iterator()
mco_seq_reset_binary_iterator()
Generated C API functions:
classname_fieldname_first()
seq_first_int(), seq_first_real()
first()
classname_fieldname_last()
seq_last_int(), seq_last_real()
last()
classname_fieldname_subseq()
seq_subseq( input, from, till )
subseq( from, till )
classname_fieldname_append()
append( values )
classname_fieldname_insert()
insert( values )
classname_fieldname_delete()
delete( from, till )
classname_fieldname_search()
seq_search( input, from, to )
search( from, boundary_from, to, boundary_to )
seq_search_first( input, from, limit )
seq_search_last( input, to, limit )
classname_fieldname_count()
count()
seq_count()
count()
classname_fieldname_map()
seq_map()
map(...)
map( positions )
classname_fieldname_project()
seq_project()
project( field1, ... )
classname_fieldname_store()
store( other )

Top Operations

Return the top n sequence elements (or their positions): top_max, top_min, top_pos_max, top_pos_min

C
C++
SQL
Python
Java
C#
mco_seq_top_max_TYPE()
topMax( n )
seq_top_max()
top_max( n )
topMax( top )
source.TopMax(int top)
mco_seq_top_min_TYPE()
topMin( n )
seq_top_min()
top_min( n )
topMin( top )
source.TopMin(int top)
mco_seq_top_pos_max_TYPE()
topPosMax( n )
seq_top_pos_max()
top_pos_max( n )
topPosMax( top )
source.TopPosMax(int top)
mco_seq_top_pos_min_TYPE()
topPosMin( n )
seq_top_pos_min()
top_pos_min( n )
topPosMin( top )
source.TopPosMin(int top)

RLE Operations

Perform Run Length Encryption (RLE) operations: count, decode, is_rle

C
C++
SQL
Python
Java
C#
mco_seq_rle_count()
rleCount( pos )
ItemRepeatCount(int i)
mco_seq_is_rle()
isRLE()
Sequence.IsRLE(Connection con)
mco_seq_rle_decode()
rleDecode()
rleDecode()
RLEDecode()

Grand Aggregate Operations

The result of all grand aggregates is returned as a double value regardless of what the actual element type of the result sequence.

C
C++
SQL
Python
Java
C#
mco_seq_agg_count()
count()
seq_count()
agg_count()
aggCount()
source.AggCount()
mco_seq_agg_max_TYPE()
aggMax()
seq_max()
agg_max()
aggMax()
source.AggMax()
mco_seq_agg_min_TYPE()
aggMin()
seq_min()
agg_min()
aggMin()
source.AggMin()
mco_seq_agg_min_max_TYPE()
agg_min_max()
aggMinMax()
source.AggMinMax()
mco_seq_agg_sum_TYPE()
aggSum()
seq_sum()
agg_sum()
aggSum()
source.AggSum()
mco_seq_agg_prd_TYPE()
aggPrd()
seq_prd()
agg_prd()
aggPrd()
source.AggPrd()
mco_seq_agg_avg_TYPE()
aggAvg()
seq_avg()
agg_avg()
aggAvg()
source.AggAvg()
mco_seq_agg_var_TYPE()
aggVar()
seq_var()
agg_var()
aggVar()
source.AggVar()
mco_seq_agg_var_samp_TYPE()
aggVarSamp()
seq_var_samp()
agg_var_samp()
aggVarSamp()
source.AggVarSamp()
mco_seq_agg_dev_TYPE()
aggDev()
seq_dev()
agg_dev()
aggDev()
source.AggDev()
mco_seq_agg_dev_samp_TYPE()
aggDevSamp()
seq_dev_samp()
agg_dev_samp()
aggDevSamp()
source.AggDevSamp()
mco_seq_agg_approxdc()
approxDistinctCount()
seq_approxdc()
agg_approxdc()
aggApproxDC()
source.aggApproxDC()
mco_seq_agg_approxdc_hash()
approxdc_hash()
aggApproxHashDC()
source.aggApproxHashDC()
seq_empty()

Group-By Aggregate Operations

Split the input sequence into groups based on the values of a group_by argument

C
C++
SQL
Python
Java
C#
mco_seq_group_agg_count()
groupAggCount()
seq_group_agg_count()
group_agg_count( group_by )
groupAggCount()
source.GroupAggCount()
mco_seq_group_agg_max_TYPE()
groupAggMax()
seq_group_agg_max()
group_agg_max( group_by )
groupAggMax( groupBy )
source.GroupAggMax(Sequence groupBy)
mco_seq_group_agg_min_TYPE()
groupAggMin()
seq_group_agg_min()
group_agg_min( group_by )
groupAggMin( groupBy )
source.GroupAggMin(Sequence groupBy)
mco_seq_group_agg_first_TYPE()
groupAggFirst()
seq_group_agg_first()
group_agg_first( group_by )
groupAggFirst( groupBy )
source.GroupAggFirst(Sequence groupBy)
mco_seq_group_agg_last_TYPE()
groupAggLast()
seq_group_agg_last()
group_agg_last( group_by )
groupAggLast( groupBy )
source.GroupAggLast(Sequence groupBy)
mco_seq_group_agg_sum_TYPE()
groupAggSum()
seq_group_agg_sum()
group_agg_sum( group_by )
groupAggSum( groupBy )
source.GroupAggSum(Sequence groupBy)
mco_seq_group_agg_avg_TYPE()
groupAggAvg()
seq_group_agg_avg()
group_agg_avg( group_by )
groupAggAvg( groupBy )
source.GroupAggAvg(Sequence groupBy)
mco_seq_group_agg_var_TYPE()
groupAggVar()
seq_group_agg_var()
group_agg_var( group_by )
groupAggVar( groupBy )
source.GroupAggVar(Sequence groupBy)
mco_seq_group_agg_var_samp_TYPE()
groupAggVarSamp()
seq_group_agg_var_samp()
group_agg_var_samp( group_by )
groupAggVarSamp( groupBy )
source.GroupAggVarSamp(Sequence groupBy)
mco_seq_group_agg_dev_TYPE()
groupAggDev()
seq_group_agg_dev()
group_agg_dev( group_by )
groupAggDev( groupBy )
source.GroupAggDev(Sequence groupBy)
mco_seq_group_agg_dev_samp_TYPE()
groupAggDevSamp()
seq_group_agg_dev_samp()
group_agg_dev_samp( group_by )
groupAggDevSamp( groupBy )
source.GroupAggDevSamp(Sequence groupBy)
mco_seq_group_agg_approxdc()
groupAggApproxDistinctCount()
seq_group_agg_approxdc()
group_agg_approxdc( group_by )
groupAggApproxDC( groupBy )
mco_seq_group_agg_approxdc_hash()
groupAggApproxDistinctHashValues()
group_agg_approxdc_hash( group_by )
groupAggApproxHashDC(SequenceIterator groupBy)
mco_seq_group_agg_wavg_TYPE()
groupAggWavg()
group_agg_wavg( group_by )
groupAggWavg( weight, groupBy )

Grid Aggregate Operations

Split the input sequence into intervals specified by the interval argument which determines the maximum number of elements in the group

C
C++
SQL
Python
Java
C#
mco_seq_grid_agg_max_TYPE()
gridAggMax()
seq_grid_agg_max()
grid_agg_max( interval )
gridAggMax( interval )
source.GridAggMax(int interval)
mco_seq_grid_agg_min_TYPE()
gridAggMin()
seq_grid_agg_min()
grid_agg_min( interval )
gridAggMin( interval )
source.GridAggMin(int interval)
mco_seq_grid_agg_sum_TYPE()
gridAggSum()
seq_grid_agg_sum()
grid_agg_sum( interval )
gridAggSum( interval )
source.GridAggSum(int interval)
mco_seq_grid_agg_avg_TYPE()
gridAggAvg()
seq_grid_agg_avg()
grid_agg_avg( interval )
gridAggAvg( interval )
source.GridAggAvg(int interval)
mco_seq_grid_agg_var_TYPE()
gridAggVar()
seq_grid_agg_var()
grid_agg_var( interval )
gridAggVar( interval )
source.GridAggVar(int interval)
mco_seq_grid_agg_var_samp_TYPE()
gridAggVarSamp()
seq_grid_agg_var_samp()
grid_agg_var_samp( interval )
gridAggVarSamp( interval )
source.GridAggVarSamp(int interval)
mco_seq_grid_agg_dev_TYPE()
gridAggDev()
seq_grid_agg_dev()
grid_agg_dev( interval )
gridAggDev( interval )
source.GridAggDev(int interval)
mco_seq_grid_agg_dev_samp_TYPE()
gridAggDevSamp()
seq_grid_agg_dev_samp()
grid_agg_dev_samp( interval )
gridAggDevSamp( interval )
source.GridAggDevSamp(int interval)

Window (Moving) Aggregate Operations

Like the “Grid” functions illustrated above, however the interval argument indicates the next N elements from the input sequence

C
C++
SQL
Python
Java
C#
mco_seq_window_agg_max_TYPE()
windowAggMax()
seq_window_agg_max()
window_agg_max( interval )
windowAggMax( interval )
source.WindowAggMax(int interval)
mco_seq_window_agg_min_TYPE()
windowAggMin()
seq_window_agg_min()
window_agg_min( interval )
windowAggMin( interval )
source.WindowAggMin(int interval)
mco_seq_window_agg_sum_TYPE()
windowAggSum()
seq_window_agg_sum()
window_agg_sum( interval )
windowAggSum( interval )
source.WindowAggSum(int interval)
mco_seq_window_agg_avg_TYPE()
windowAggAvg()
seq_window_agg_avg()
window_agg_avg( interval )
windowAggAvg( interval )
source.WindowAggAvg(int interval)
mco_seq_window_agg_var_TYPE()
windowAggVar()
seq_window_agg_var()
window_agg_var( interval )
windowAggVar( interval )
source.WindowAggVar(int interval)
mco_seq_window_agg_var_samp_TYPE()
windowAggVarSamp()
seq_window_agg_var_samp()
window_agg_var_samp( interval )
windowAggVarSamp( interval )
source.WindowAggVarSamp(int interval)
mco_seq_window_agg_dev_TYPE()
windowAggDev()
seq_window_agg_dev()
window_agg_dev( interval )
windowAggDev( interval )
source.WindowAggDev(int interval)
mco_seq_window_agg_dev_samp_TYPE()
windowAggDevSamp()
seq_window_agg_dev_samp()
window_agg_dev_samp( interval )
windowAggDevSamp( interval )
source.WindowAggDevSamp(int interval)
mco_seq_window_agg_ema_TYPE()
seq_window_agg_ema()
windowAggEma( period )
source.WindowAggEma(int period)
mco_seq_window_agg_atr_TYPE()
seq_window_agg_atr()
windowAggAtr( period )
source.WindowAggAtr(int period)

Hash Group-By Aggregate Operations

Group the resulting sequence by a grouping sequence that is not ordered

C
C++
SQL
Python
Java
C#
seq_hash_agg_group_by()
seq_hash_group_by()

Hash Aggregate Operations

These functions operate on a sequence obtained by the "hash aggregate group by" functions

C
C++
SQL
Python
Java
C#
mco_seq_hash_agg_max_TYPE()
hashAggMax()
seq_hash_agg_max()
hash_agg_max( ... )
hashAggMax( groupBy, nGroups )
source.HashAggMax(out Sequence groups, Sequence groupBy, int nGroups)
mco_seq_hash_agg_min_TYPE()
hashAggMin()
seq_hash_agg_min()
hash_agg_min( ... )
hashAggMin( groupBy, nGroups )
source.HashAggMin(out Sequence groups, Sequence groupBy, int nGroups)
mco_seq_hash_agg_sum_TYPE()
hashAggSum()
seq_hash_agg_sum()
hash_agg_sum( ... )
hashAggSum( groupBy, nGroups )
source.HashAggSum(out Sequence groups, Sequence groupBy, int nGroups)
mco_seq_hash_agg_avg_TYPE()
hashAggAvg()
seq_hash_agg_avg()
hash_agg_avg( ... )
hashAggAvg( groupBy, nGroups )
source.HashAggAvg(out Sequence groups, Sequence groupBy, int nGroups)
mco_seq_hash_agg_approxdc()
hashAggApproxDistinctCount()
seq_hash_agg_approxdc()
hash_agg_approxdc( ... )
hashAggApproxdc( groupBy, nGroups )
source.HashAggApproxdc(out Sequence groups, Sequence groupBy, int nGroups)
mco_seq_hash_agg_count()
hashAggCount()
seq_hash_agg_count()
hash_agg_count( ... )
hashAggCount( nGroups )
source.HashAggCount(out Sequence groups, int nGroups)
mco_seq_hash_agg_distinct_count()
hashAggDistinctCount()
hash_agg_distinct_count( ... )
hashAggDistinctCount( groupBy, Groups, nPairs)
source.HashAggDistinctCount(out Sequence groups, Sequence groupBy, int nGroups, int nPairs)
mco_seq_hash_agg_dup_count()
hashAggDupCount()
hash_agg_dup_count()
hashAggDupCount( groupBy, nGroups, nPairs, minOccurrences)
source.HashAggDupCount(out Sequence groups, Sequence groupBy, int nGroups, int nPairs, int minOccurrences)
mco_seq_is_hash_aggreate()
Sequence.IsRLE(Connection con)

Cumulative Aggregate Operations

Accumulate the average, sum, product, etc. of all preceding elements in the result sequence

C
C++
SQL
Python
Java
C#
mco_seq_cum_agg_max_TYPE()
cumAggMax()
seq_cum_agg_max()
cum_agg_max()
cumAggMax()
source.CumAggMax()
mco_seq_cum_agg_min_TYPE()
cumAggMin()
seq_cum_agg_min()
cum_agg_min()
cumAggMin()
source.CumAggMin()
mco_seq_cum_agg_sum_TYPE()
cumAggSum()
seq_cum_agg_sum()
cum_agg_sum()
cumAggSum()
source.CumAggSum()
mco_seq_cum_agg_prd_TYPE()
cumAggPrd()
seq_cum_agg_prd()
cum_agg_prd()
cumAggPrd()
source.CumAggPrd()
mco_seq_cum_agg_avg_TYPE()
cumAggAvg()
seq_cum_agg_avg()
cum_agg_avg()
cumAggAvg()
source.CumAggAvg()
mco_seq_cum_agg_var_TYPE()
cumAggVar()
seq_cum_agg_var()
cum_agg_var()
cumAggVar()
source.CumAggVar()
mco_seq_cum_agg_var_samp_TYPE()
cumAggVarSamp()
seq_cum_agg_var_samp()
cum_agg_var_samp()
cumAggVarSamp()
source.CumAggVarSamp()
mco_seq_cum_agg_dev_TYPE()
cumAggDev()
seq_cum_agg_dev()
cum_agg_dev()
cumAggDev()
source.CumAggDev()
mco_seq_cum_agg_dev_samp_TYPE()
cumAggDevSamp()
seq_cum_agg_dev_samp()
cum_agg_dev_samp()
cumAggDevSamp()
source.CumAggDevSamp()

Miscellaneous Operations

Provide functionalities such as: sort, orderby, histogram, hash, func, func2, cond

C
C++
SQL
Python
Java
C#
mco_seq_histogram_TYPE()
histogram()
seq_histogram()
histogram( ... )
histogram( low, high, nIntervals)Miscellaneous_Methods.htm
source.Histogram(object low, object high, int nIntervals)
mco_seq_sort_TYPE()
sort()
seq_sort()
sort( ... )
sort( arr, permutation, order)
source.Sort(Array values, SequenceOrder order)
mco_seq_order_by_TYPE()
permutate()
seq_order_by()
order_by( ... )
source.Sort(Array values, SequenceOrder order)
mco_seq_hash()
hash()
source.Hash()
mco_seq_func_TYPE()
apply( func )
func( func, arg )
source.Map(Sequence positions)
mco_seq_func2_TYPE()
apply( other, func )
Sequence.Cat(left, right)
mco_seq_func_ctx_TYPE
Sequence.Cat(left, right)
mco_seq_func2_ctx_TYPE
Sequence.Cat(left, right)
mco_seq_cond_TYPE()
condition.If(thenSequence, otherwiseSequence, bool lazy)
mco_seq_cond_ctx_TYPE()
condition.If(thenSequence, otherwiseSequence, bool lazy)