You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Samisa Abeysinghe (JIRA)" <ji...@apache.org> on 2006/12/06 06:34:22 UTC
[jira] Updated: (AXIS2C-424) adding a random number generator
[ http://issues.apache.org/jira/browse/AXIS2C-424?page=all ]
Samisa Abeysinghe updated AXIS2C-424:
-------------------------------------
Component/s: util
Fix Version/s: 0.96
Affects Version/s: Current (Nightly)
Assignee: Damitha Kumarage
> adding a random number generator
> --------------------------------
>
> Key: AXIS2C-424
> URL: http://issues.apache.org/jira/browse/AXIS2C-424
> Project: Axis2-C
> Issue Type: Improvement
> Components: util
> Affects Versions: Current (Nightly)
> Reporter: Damitha Kumarage
> Assigned To: Damitha Kumarage
> Priority: Minor
> Fix For: 0.96
>
>
> The api is as follows
> /**
> * @file axis2_rand.h
> * @brief A simple thread safe and reentrant random number generator
> */
> /**
> * This is reentrant and thread safe simple random number generator
> * function. it is passed an pointer to an unsigned int state value
> * which is used inside the function and changed in each call.
> * @param seedp pointer to an unsigned int used as the internal state
> * @return int <code>int<code>
> */
> AXIS2_EXTERN int AXIS2_CALL
> axis2_rand(
> unsigned int *seedp);
> /**
> * This is reentrant and thread safe simple random number generator
> * function. it is passed an pointer to an unsigned int state value
> * which is used inside the function and changed in each call. Also
> * it is passed a range in which the random number is selected
> * @param seedp pointer to an unsigned int used as the internal state
> * @param start start of the range
> * @param end end of the range
> * @return int If invalid range is entered -1 is returned <code>int<code>
> */
> 26,1 55%
> AXIS2_EXTERN int AXIS2_CALL
> axis2_rand_with_range(
> unsigned int *seedp,
> int start,
> int end);
> /**
> * A random seed value generated based on the time
> */
> AXIS2_EXTERN unsigned int AXIS2_CALL
> axis2_rand_get_seed_value_based_on_time(
> const axis2_env_t *env);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org