Package vsql_core :: Package utils :: Module low_rank_helper
[hide private]
[frames] | no frames]

Module low_rank_helper

source code

This is a helper module for the low rank code

Classes [hide private]
  ReadList
Functions [hide private]
double
dot(x, y)
Computes dot products of the given two vectors and returns the dot product value
source code
 
scale_and_add(dst, src, s)
This method adds scaled vector to the given other vector
source code
 
ball_project(x, B, B2)
This function normalizes given vector if its norm square is greater than the given threshold
source code
vector
make_random_vec(dim)
Creates random vector with the given dimension
source code
tuple
make_initial(max_rank, nRows, nCols, B)
Make initial function
source code
number
get_bucket(nsplits, nrows, row, row_map)
Gets bucket
source code
 
split_a_model(nSplits, nRows, L, row_perm) source code
 
split_the_model(nSplits, nRows, nCols, L, R, row_perm, col_perm) source code
 
tablename_prefix(mid, epoch_sign) source code
 
tablename_lmodel(mid, epoch_sign, part) source code
 
tablename_rmodel(mid, epoch_sign, part) source code
 
tablename_data(mid, epoch_sign, part) source code
 
get_l_chunk(nsplits, round, chunk) source code
 
get_r_chunk(nsplits, round, chunk) source code
 
get_part(nsplits, round, chunk) source code
 
build_array_string(v) source code
Function Details [hide private]

dot(x, y)

source code 

Computes dot products of the given two vectors and returns the dot product value

Parameters:
  • x (vector) - vector
  • y (vector) - vector
Returns: double
returns the dot product value of two vectors

scale_and_add(dst, src, s)

source code 

This method adds scaled vector to the given other vector

Parameters:
  • dst (vector) - dst vector
  • src (vector) - src vector which will be scaled
  • s (double) - scale factor

ball_project(x, B, B2)

source code 

This function normalizes given vector if its norm square is greater than the given threshold

Parameters:
  • x (vector) - given vector to normalized
  • B (double) - given norm
  • B2 (double) - norm threshold

make_random_vec(dim)

source code 

Creates random vector with the given dimension

Parameters:
  • dim (number) - dimension of the random vector
Returns: vector
random vector with the given dim

make_initial(max_rank, nRows, nCols, B)

source code 

Make initial function

Parameters:
  • max_rank (double) - max rank(dim)
  • nRows (number) - # of rows
  • nCols (number) - #of cols
  • B (double) - B
Returns: tuple
returns L and R

get_bucket(nsplits, nrows, row, row_map)

source code 

Gets bucket

Parameters:
  • nsplits (number) - splits
  • nrows (number) - # of rows
  • row (number) - row index
  • row_map (vector) - row map
Returns: number
bucket