2011-12-15 06:16:05 +00:00
|
|
|
/*
|
|
|
|
**********************************************************************
|
2012-05-25 20:09:01 +00:00
|
|
|
* Copyright (c) 2011-2012,International Business Machines
|
2011-12-15 06:16:05 +00:00
|
|
|
* Corporation and others. All Rights Reserved.
|
|
|
|
**********************************************************************
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SIEVE_H
|
|
|
|
#define SIEVE_H
|
|
|
|
|
2012-05-25 20:09:01 +00:00
|
|
|
#ifndef U_LOTS_OF_TIMES
|
2011-12-15 23:16:20 +00:00
|
|
|
#define U_LOTS_OF_TIMES 1000000
|
2012-05-25 20:09:01 +00:00
|
|
|
#endif
|
2011-12-15 06:16:05 +00:00
|
|
|
|
|
|
|
#include "unicode/utypes.h"
|
|
|
|
/**
|
|
|
|
* Calculate the standardized sieve time (1 run)
|
|
|
|
*/
|
|
|
|
U_INTERNAL double uprv_calcSieveTime(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Calculate the mean time, with margin of error
|
|
|
|
* @param times array of times (modified/sorted)
|
2012-09-17 19:03:01 +00:00
|
|
|
* @param timeCount length of array - on return, how many remain after throwing out outliers
|
2011-12-15 06:16:05 +00:00
|
|
|
* @param marginOfError out parameter: gives +/- margin of err at 95% confidence
|
|
|
|
* @return the mean time, or negative if error/imprecision.
|
|
|
|
*/
|
2012-09-17 19:03:01 +00:00
|
|
|
U_INTERNAL double uprv_getMeanTime(double *times, uint32_t *timeCount, double *marginOfError);
|
2011-12-15 06:16:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the standardized sieve time. (Doesn't recalculate if already computed.
|
|
|
|
* @param marginOfError out parameter: gives +/- margin of error at 95% confidence.
|
|
|
|
* @return the mean time, or negative if error/imprecision.
|
|
|
|
*/
|
|
|
|
U_INTERNAL double uprv_getSieveTime(double *marginOfError);
|
|
|
|
|
|
|
|
#endif
|