[Libprime-devel-cvs] CVS: libprime/src/include libprime.h,1.4,1.5
Status: Inactive
Brought to you by:
simmo
|
From: Andrew S. <si...@us...> - 2001-12-08 13:55:02
|
Update of /cvsroot/libprime/libprime/src/include
In directory usw-pr-cvs1:/tmp/cvs-serv869/src/include
Modified Files:
libprime.h
Log Message:
working towards a 0.2 libprime release
Index: libprime.h
===================================================================
RCS file: /cvsroot/libprime/libprime/src/include/libprime.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- libprime.h 2001/12/06 08:57:48 1.4
+++ libprime.h 2001/12/08 13:54:57 1.5
@@ -1,22 +1,22 @@
/*
- libprime
- libprime.h
+ * libprime
+ * Copyright (c) 2001 Andrew Simmonds <si...@ii...>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * 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 the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- 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 the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
#ifndef LIBPRIME_H
#define LIBPRIME_H
@@ -31,31 +31,31 @@
typedef const char cchar;
typedef const float cfloat;
typedef const ulong culong;
-typedef std::vector<ulong> aulong;
+typedef std::vector < ulong > aulong;
class NextPrime {
-private:
+ private:
ulong prime_number;
-public:
+ public:
NextPrime(ulong prime_in);
ulong get();
- ulong operator++();
- ulong operator()();
+ ulong operator++ ();
+ ulong operator() ();
};
class PrimeRange {
-private:
- inline bool TestOfPrimeness(uchar *PrimeStore, ulong PrimeCount);
- inline bool SetPrimes(uchar *PrimeStore, ulong PrimeCount);
+ private:
+ inline bool TestOfPrimeness(uchar * PrimeStore, ulong PrimeCount);
+ inline bool SetPrimes(uchar * PrimeStore, ulong PrimeCount);
uchar *ucPrimeStorage;
culong culMaxPrime;
ulong ulCount;
ulong ulHits;
-public:
+ public:
PrimeRange(culong culMaxPrimeNumber);
~PrimeRange();
- ulong InitPrimeRange();
- ulong GetPrimeRange(ulong ulStartOfRange, ulong ulEndOfRange, aulong& PrimeList);
+ ulong init();
+ ulong get(ulong ulStartOfRange, ulong ulEndOfRange, aulong & PrimeList);
};
bool GetIsPrime(ulong TestPrimeNumber);
|