casacore
Public Member Functions | Private Member Functions | Private Attributes | List of all members
casacore::CompositeNumber Class Reference

More...

#include <CompositeNumber.h>

Public Member Functions

 CompositeNumber (const uInt maxval=8192)
 constructor: Note: if you later make a call with value > maxval, we will recalculate the list of composite numbers More...
 
 ~CompositeNumber ()
 destructor More...
 
uInt nextLarger (const uInt value)
 return the next larger composite number More...
 
uInt nextSmaller (const uInt value)
 return the next smaller composite number More...
 
uInt nearest (const uInt value)
 return the nearest composite number More...
 
uInt nextLargerEven (const uInt value)
 return the next larger even composite number More...
 
uInt nextSmallerEven (const uInt value)
 return the next smaller even composite number More...
 
uInt nearestEven (const uInt value)
 return the closest even composite number More...
 
Bool isComposite (const uInt value)
 returns True is value is composite More...
 

Private Member Functions

void generate (const uInt maxval)
 

Private Attributes

Block< uIntitsNumbers
 
uInt itsMaxComplete
 

Detailed Description

This class generates composite numbers

Intended use:

Public interface

Synopsis

This class generates a list of composite numbers made up of powers of 2, 3, and 5, which are less than some max value and returns the smallest composite number greater than some number given.

Example

CompositeNumber cn(1000);
Int n = cn.nextLarger(319);
Int m = cn.nextSmaller(462);
Int l = cn.nearest(462);
CompositeNumber(const uInt maxval=8192)
constructor: Note: if you later make a call with value > maxval, we will recalculate the list of comp...
int Int
Definition: aipstype.h:50

Definition at line 57 of file CompositeNumber.h.

Constructor & Destructor Documentation

◆ CompositeNumber()

casacore::CompositeNumber::CompositeNumber ( const uInt  maxval = 8192)

constructor: Note: if you later make a call with value > maxval, we will recalculate the list of composite numbers

◆ ~CompositeNumber()

casacore::CompositeNumber::~CompositeNumber ( )

destructor

Member Function Documentation

◆ generate()

void casacore::CompositeNumber::generate ( const uInt  maxval)
private

◆ isComposite()

Bool casacore::CompositeNumber::isComposite ( const uInt  value)

returns True is value is composite

◆ nearest()

uInt casacore::CompositeNumber::nearest ( const uInt  value)

return the nearest composite number

◆ nearestEven()

uInt casacore::CompositeNumber::nearestEven ( const uInt  value)

return the closest even composite number

◆ nextLarger()

uInt casacore::CompositeNumber::nextLarger ( const uInt  value)

return the next larger composite number

◆ nextLargerEven()

uInt casacore::CompositeNumber::nextLargerEven ( const uInt  value)

return the next larger even composite number

◆ nextSmaller()

uInt casacore::CompositeNumber::nextSmaller ( const uInt  value)

return the next smaller composite number

◆ nextSmallerEven()

uInt casacore::CompositeNumber::nextSmallerEven ( const uInt  value)

return the next smaller even composite number

Member Data Documentation

◆ itsMaxComplete

uInt casacore::CompositeNumber::itsMaxComplete
private

Definition at line 92 of file CompositeNumber.h.

◆ itsNumbers

Block<uInt> casacore::CompositeNumber::itsNumbers
private

Definition at line 91 of file CompositeNumber.h.


The documentation for this class was generated from the following file: