|
From: <kin...@us...> - 2024-07-01 16:00:39
|
Revision: 7173
http://sourceforge.net/p/teem/code/7173
Author: kindlmann
Date: 2024-07-01 16:00:38 +0000 (Mon, 01 Jul 2024)
Log Message:
-----------
forgot to add this after having added the JSF code
Added Paths:
-----------
teem/trunk/src/air/test/trandJSF.c
Added: teem/trunk/src/air/test/trandJSF.c
===================================================================
--- teem/trunk/src/air/test/trandJSF.c (rev 0)
+++ teem/trunk/src/air/test/trandJSF.c 2024-07-01 16:00:38 UTC (rev 7173)
@@ -0,0 +1,54 @@
+/*
+ Teem: Tools to process and visualize scientific data and images
+ Copyright (C) 2009--2023 University of Chicago
+ Copyright (C) 2005--2008 Gordon Kindlmann
+ Copyright (C) 1998--2004 University of Utah
+
+ This library is free software; you can redistribute it and/or modify it under the terms
+ of the GNU Lesser General Public License (LGPL) as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your option) any later version.
+ The terms of redistributing and/or modifying this software also include exceptions to
+ the LGPL that facilitate static linking.
+
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License along with
+ this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
+ Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#include "../air.h"
+
+int
+main(int argc, char *argv[]) {
+ char *me, *SS, *NS, *MS;
+ unsigned ii, S, N, M;
+ airJSFRand *jsf;
+
+ me = argv[0];
+ if (4 != argc) {
+ /* 0 1 2 3 (4) */
+ fprintf(stderr, "usage: %s <S> <N> <M>\n", me);
+ exit(1);
+ }
+ SS = argv[1];
+ NS = argv[2];
+ MS = argv[3];
+ if (3 != sscanf(SS, "%u", &S) + sscanf(NS, "%u", &N) + sscanf(MS, "%u", &M)) {
+ fprintf(stderr, "%s: couldn't parse %s,%s,%s as uint S,N,M\n", me, SS, NS, MS);
+ exit(1);
+ }
+ /* to stderr to can better pipe output */
+ fprintf(stderr, "S=%u N=%u M=%u\n", S, N, M);
+ fprintf(stderr, "airJSFRandSanity() = %d\n", airJSFRandSanity());
+
+ jsf = airJSFRandNew(S);
+ for (ii = 0; ii < N; ii++) {
+ printf("%u\n", airJSFRandValMod(jsf, M));
+ }
+ airJSFRandNix(jsf);
+
+ exit(0);
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|