### bugfix

parent 251e344f
 1; # octave script file N = 5; D = 2; EPS = 0.3; X = rand(N, D); # X = [1,2,3 ; 1.1, 2.2, 3; 5, 6, 7; 5.1, 6.2, 7.1] P = zeros(N,1); qEPS = EPS^2 / 4; # pre-compute the values Pi: for i = 1:rows(X) # BLAS level 1 ddot: P(i) = qEPS - ( dot( X(i,:), X(i,:) ) / 2); endfor # BLAS level 3 dgemm: scalarp = X * X'; # loop over lower triangle of scalarp for i = 2:rows(scalarp) for j = 1:(i-1) # join partner i and j scalarp(i,j) += P(i) + P(j); endfor endfor # if scalarp(i,j) greater than 0, then we have a join partner scalarp \ No newline at end of file 1; # octave script file N = 4; D = 3; EPS = 0.3; X = rand(N, D); # X = [ 1,2,3 ; 1.1, 2.2, 3; 5, 6, 7; 5.1, 6.2, 7.1] P = zeros(N,1); qEPS = EPS^2 / 4; # pre-compute the values Pi: for i = 1:rows(X) # BLAS level 1 ddot: P(i) = qEPS - ( dot( X(i,:), X(i,:) ) / 2); endfor # BLAS level 3 dgemm: scalarp = X * X'; # loop over lower triangle of scalarp for i = 2:rows(scalarp) for j = 1:(i-1) # join partner i and j scalarp(i,j) += P(i) + P(j); endfor endfor # if scalarp(i,j) greater than 0, then we have a join partner scalarp \ No newline at end of file ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!