source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/lightspeed/flops_solve_tri.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 491 bytes
Line 
1function f = flops_solve_tri(T,b,c)
2% FLOPS_SOLVE_TRI   Flops for triangular left division.
3% FLOPS_SOLVE_TRI(T,b) returns the number of flops for solve_tri(T,b).
4% FLOPS_SOLVE_TRI(n,n,m) returns the number of flops for
5% solve_tri(eye(n),ones(n,m)).
6
7if nargin == 2
8  f = flops_solve_tri(rows(T),cols(T),cols(b));
9  return;
10end
11% number of multiplies+adds is
12% sum(i=1..n) sum(k=i-1..1) 2 = sum(i=1..n) 2*(i-1) = n^2-n
13% number of divides is n
14f = (T*b + b*(flops_div-1))*c;
Note: See TracBrowser for help on using the repository browser.