Compare distribution of three random integer algorithm.
python
sadrand
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

runplot3d.sh 543B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/sh
  2. usage() {
  3. echo "Usage $0 [max_resolution [min_resolution]]" >&2
  4. }
  5. if [ "$#" -gt 4 ]
  6. then
  7. usage
  8. exit 1
  9. fi
  10. if [ "$1" = "-h" ]
  11. then
  12. usage
  13. exit 0
  14. fi
  15. maxres=${1:-100}
  16. minres=${2:-90}
  17. iter_res=${3:-10000}
  18. if [ "$maxres" -le "$minres" ]
  19. then
  20. usage
  21. exit 2
  22. fi
  23. for resolution in $(seq $minres $maxres)
  24. do
  25. echo "iter $resolution / $maxres"
  26. iter=$(expr $resolution \* $iter_res)
  27. ./sadrand.py -R -r $resolution -i $iter | sed "s/^/$resolution /";
  28. echo ''
  29. done | tee /tmp/rnd3d.dat
  30. ./plot3d.gp