This is an automated email from the git hooks/post-receive script.
sebastic-guest pushed a commit to branch upstream-master
in repository pktools.
commit d7dd46be9a7e477ceb8dd195c24c5834b042cf5e
Author: Default Seadas User <seadas-user@localhost>
Date: Fri Feb 7 18:55:51 2014 +0100
pkinfo hist bin for integers
---
src/apps/pkinfo.cc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/apps/pkinfo.cc b/src/apps/pkinfo.cc
index c1dfd41..1282dff 100644
--- a/src/apps/pkinfo.cc
+++ b/src/apps/pkinfo.cc
@@ -305,8 +305,14 @@ int main(int argc, char *argv[])
unsigned long int
nsample=imgReader.getHistogram(output,minValue,maxValue,nbin,band_opt[0]);
std::cout.precision(10);
for(int bin=0;bin<nbin;++bin){
+ double binValue=0;
// nsample+=output[bin];
- std::cout <<
minValue+static_cast<double>(maxValue-minValue)*(bin+0.5)/nbin << " ";
+ if(nbin==maxValue-minValue+1)
+ binValue=minValue+bin;
+ else
+
binValue=minValue+static_cast<double>(maxValue-minValue)*(bin+0.5)/nbin;
+ std::cout << binValue << " ";
+ // std::cout <<
minValue+static_cast<double>(maxValue-minValue)*(bin+0.5)/nbin << " ";
if(relative_opt[0])
std::cout <<
100.0*static_cast<double>(output[bin])/static_cast<double>(nsample) <<
std::endl;
else
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-grass/pktools.git
_______________________________________________
Pkg-grass-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel