Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "src/reduction"

Index

Type aliases

MatrixOrNumber

MatrixOrNumber: util.MatrixOrNumber

Variables

argmax_along_axis

argmax_along_axis: any = make_reduction_along_axis('var curret = val, curamax = 0;','if(val>curret){curret=val;curamax=red;}','dst_data[dst_idx]=curret; amax_data[dst_idx]=curamax+1;', true)

argmin_along_axis

argmin_along_axis: any = make_reduction_along_axis('var curret = val, curamax = 0;','if(val<curret){curret=val;curamax=red;}','dst_data[dst_idx]=curret; amax_data[dst_idx]=curamax+1;', true)

max_along_axis

max_along_axis: any = make_reduction_along_axis('var curret = val;','if(val>curret){curret=val;}','dst_data[dst_idx]=curret;', false)

max_elementwise

max_elementwise: function = func_generator.make_binary_arith_func_all('Math.max(%a,%b)')

Type declaration

mean_along_axis

mean_along_axis: any = make_reduction_along_axis_stat('var curret = val;','curret += val;', 'dst_data[dst_idx] = curret / reduction_count;')

min_along_axis

min_along_axis: any = make_reduction_along_axis('var curret = val;','if(val<curret){curret=val;}','dst_data[dst_idx]=curret;', false)

min_elementwise

min_elementwise: function = func_generator.make_binary_arith_func_all('Math.min(%a,%b)')

Type declaration

prod_along_axis

prod_along_axis: any = make_reduction_along_axis_stat('var curret = val;','curret *= val;', 'dst_data[dst_idx] = curret;')

std_along_axis_w0

std_along_axis_w0: any = make_reduction_along_axis_stat('var normalsum = val; var sqsum = val * val;','normalsum += val; sqsum += val * val;', 'dst_data[dst_idx] = Math.sqrt((sqsum - normalsum * normalsum / reduction_count) / Math.max(reduction_count - 1, 1));')

std_along_axis_w1

std_along_axis_w1: any = make_reduction_along_axis_stat('var normalsum = val; var sqsum = val * val;','normalsum += val; sqsum += val * val;', 'dst_data[dst_idx] = Math.sqrt((sqsum - normalsum * normalsum / reduction_count) / reduction_count);')

sum_along_axis

sum_along_axis: any = make_reduction_along_axis_stat('var curret = val;','curret += val;', 'dst_data[dst_idx] = curret;')

variance_along_axis_w0

variance_along_axis_w0: any = make_reduction_along_axis_stat('var normalsum = val; var sqsum = val * val;','normalsum += val; sqsum += val * val;', 'dst_data[dst_idx] = (sqsum - normalsum * normalsum / reduction_count) / Math.max(reduction_count - 1, 1);')

variance_along_axis_w1

variance_along_axis_w1: any = make_reduction_along_axis_stat('var normalsum = val; var sqsum = val * val;','normalsum += val; sqsum += val * val;', 'dst_data[dst_idx] = (sqsum - normalsum * normalsum / reduction_count) / reduction_count;')

Functions

_argmax_ones_like

  • _argmax_ones_like(A: Matrix): object

argmax

argmin

make_reduction_along_axis

  • make_reduction_along_axis(var_decl: string, var_update: string, result_assign: string, out_argmax: boolean): any
  • Parameters

    • var_decl: string
    • var_update: string
    • result_assign: string
    • out_argmax: boolean

    Returns any

make_reduction_along_axis_stat

  • make_reduction_along_axis_stat(var_decl: string, var_update: string, result_assign: string): any
  • Parameters

    • var_decl: string
    • var_update: string
    • result_assign: string

    Returns any

max

max_along_axis_old

mean

min

prod

std

sum

sum_mean

variance

Generated using TypeDoc