greenplumn CRandom 源码
greenplumn CRandom 代码
文件路径:/src/backend/gporca/libgpos/include/gpos/common/CRandom.h
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2008 Greenplum, Inc.
//
// @filename:
// CRandom.h
//
// @doc:
// Random number generator.
//
// @owner:
// Siva
//
// @test:
//
//
//---------------------------------------------------------------------------
#ifndef GPOS_CRandom_H
#define GPOS_CRandom_H
#include "gpos/types.h"
namespace gpos
{
class CRandom
{
private:
// seed
ULONG m_seed; // NOLINT(modernize-use-default-member-init)
public:
CRandom(const CRandom &) = delete;
// no seed
CRandom();
// c'tor with seed
CRandom(ULONG seed);
// next random number
ULONG Next();
// d'tor
~CRandom();
}; //class CRandom
} // namespace gpos
#endif /* CRANDOM_H_ */
// EOF
相关信息
相关文章
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
7、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦