Lucene++ - a full-featured, c++ search engine
API Documentation


Loading...
Searching...
No Matches
Random.h
Go to the documentation of this file.
1
2// Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3// Distributable under the terms of either the Apache License (Version 2.0)
4// or the GNU Lesser General Public License.
6
7#ifndef RANDOM_H
8#define RANDOM_H
9
10#include "LuceneObject.h"
11
12namespace Lucene {
13
15class LPPAPI Random : public LuceneObject {
16public:
18 Random(int64_t seed);
19
20 virtual ~Random();
21
22protected:
23 int64_t seed;
24
25public:
26 void setSeed(int64_t seed);
27 int32_t nextInt(int32_t limit = INT_MAX);
28 double nextDouble();
29
30protected:
31 int32_t next(int32_t bits);
32};
33
34}
35
36#endif
Base class for all Lucene classes.
Definition LuceneObject.h:31
Utility class to generate a stream of pseudorandom numbers.
Definition Random.h:15
int32_t next(int32_t bits)
double nextDouble()
virtual ~Random()
Random(int64_t seed)
int32_t nextInt(int32_t limit=INT_MAX)
int64_t seed
Definition Random.h:23
void setSeed(int64_t seed)
Definition AbstractAllTermDocs.h:12

clucene.sourceforge.net