Mercurial > hg > medcouple
comparison jmedcouple.c++ @ 27:40cbfb64e952
jmedcouple: change type of medc_idx to long
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Sun, 18 Jan 2015 19:51:16 -0500 |
parents | 518ef922033e |
children | 65f6fad65f49 |
comparison
equal
deleted
inserted
replaced
26:6e69d0bfd44f | 27:40cbfb64e952 |
---|---|
136 vector<int> L(n_plus, 0); | 136 vector<int> L(n_plus, 0); |
137 vector<int> R(n_plus, n_minus - 1); | 137 vector<int> R(n_plus, n_minus - 1); |
138 | 138 |
139 long Ltot = 0; | 139 long Ltot = 0; |
140 long Rtot = n_minus*n_plus; | 140 long Rtot = n_minus*n_plus; |
141 int medc_idx = Rtot/2; | 141 long medc_idx = Rtot/2; |
142 | 142 |
143 // kth pair algorithm (Johnson & Mizoguchi) | 143 // kth pair algorithm (Johnson & Mizoguchi) |
144 while (Rtot - Ltot > n_plus) { | 144 while (Rtot - Ltot > n_plus) { |
145 // First, compute the median inside the given bounds | 145 // First, compute the median inside the given bounds |
146 vector<double> A; | 146 vector<double> A; |