casacore
Modules | Classes | Functions

More...

Modules

 Utilities_module_internal_classes
 Internal Utilities_module classes and functions.
 

Classes

class  casacore::AlignMemory
  More...
 
class  casacore::assert_< t >
  More...
 
struct  casacore::BinarySearch_global_functions_binarysearch
  More...
 
class  casacore::BitVector
  More...
 
class  casacore::CASATask
  More...
 
struct  casacore::Compare_global_functions_ObjCompareFunc
  More...
 
class  casacore::BaseCompare
 abstract base class for comparing two objects More...
 
class  casacore::ObjCompare< T >
 compare two objects More...
 
class  casacore::CompareIntervalInt< T >
 Integer comparison class with intervals. More...
 
class  casacore::CompareIntervalReal< T >
 Real comparison class with intervals. More...
 
class  casacore::CompareNoCase
 Case-insensitive string comparison class. More...
 
class  casacore::CompareAlwaysTrue
 Comparison class that is always true. More...
 
class  casacore::CompositeNumber
  More...
 
struct  casacore::Copy_global_functions_throw
  More...
 
struct  casacore::Copy_global_functions_test
 Test routines
More...
 
struct  casacore::Copy_global_functions_copy
 Copy methods
More...
 
struct  casacore::CountedPtr_global_functions_dereference_error
  More...
 
class  casacore::CountedPtr< t >
 Referenced counted pointer for constant data. More...
 
class  casacore::COWPtr< T >
  More...
 
struct  casacore::DataType_global_functions_DataType
  More...
 
struct  casacore::DefaultValue_global_functions_defval
  More...
 
class  casacore::DynBuffer
  More...
 
struct  casacore::Fallible_global_functions_invalid_access
  More...
 
class  casacore::Fallible< T >
 Mark a value as valid or invalid. More...
 
struct  casacore::generic_global_functions_def
  More...
 
struct  casacore::LinearSearch_global_functions_linearsearch
  More...
 
class  casacore::MUString
  More...
 
struct  casacore::MUString_global_functions_output
 Global functions. More...
 
class  casacore::Notice
  More...
 
class  casacore::NoticeSource
 base class for notice originators More...
 
class  casacore::NoticeTarget
 abstract base class for notice receptors More...
 
class  casacore::PtrHolder< T >
  More...
 
class  SPtrHolder< T >
 Hold and delete pointers not deleted by object destructors. More...
 
class  casacore::RecordTransformable
  More...
 
class  casacore::Regex
  More...
 
class  casacore::Sequence< t >
  More...
 
class  casacore::uIntSequence
 uInt sequence for general use More...
 
class  casacore::Sort
 Sort on one or more keys, ascending and/or descending. More...
 
class  casacore::SortError
  More...
 
class  casacore::SortInvDT
 Invalid data type used for this sort key. More...
 
class  casacore::SortInvIncr
 Invalid increment used for this sort key. More...
 
class  casacore::SortNoData
 No data array given to Sort constructor. More...
 
class  casacore::SortInvOpt
 Invalid sort option given to routine dosort. More...
 
class  casacore::StringDistance
  More...
 
class  casacore::ValType
  More...
 
struct  casacore::ValTypeId_global_functions_typeid
  More...
 

Functions

template<class T >
uInt casacore::genSort (T *data, uInt nr, Sort::Order order=Sort::Ascending, int options=0)
 Global in-place sort functions The following global functions are easier to use than the static GenSort member functions. More...
 
template<class T , class INX = uInt>
uInt casacore::genSort (Vector< INX > &indexVector, const T *data, INX nr, Sort::Order order=Sort::Ascending, int options=0)
 Global indirect sort functions The following global functions easier to use than the static GenSortIndirect member functions. More...
 
uInt casacore::precisionForValueErrorPairs (const Vector< Double > &pair1, const Vector< Double > &pair2)
  More...
 

Detailed Description

Classes and global functions for general use

See below for an overview of the classes in this module.

Review Status

Reviewed By:
Friso Olnon
Date Reviewed:
1995/03/20

Synopsis

This module is a bag of unrelated mini-modules, classes and global functions. The following functional groups can be recognized:


Tip: You may want to look at the individual header files to see whether you might not prefer to include only the header files you really need; it may be more efficient to do so;

Function Documentation

◆ genSort() [1/2]

template<class T >
uInt casacore::genSort ( T *  data,
uInt  nr,
Sort::Order  order = Sort::Ascending,
int  options = 0 
)
inline

Global in-place sort functions The following global functions are easier to use than the static GenSort member functions.

They do an in-place sort of data, thus the data themselves are moved ending up in the requested order.

The default sorting method is QuickSort, which is the fastest. However, there are pathological cases where it can be slow. HeapSort is about twice a slow, but its speed is guaranteed. InsSort (insertion sort) can be very, very slow, but it is the only stable sort method (i.e. equal values are kept in their original order). However, (see (name=genSortIndirect)) indirect sorting methods
are available to make QuickSort and HeapSort stable.

All sort methods have an option to skip duplicate values. This is the only case where the returned number of values can be less than the original number of values.


Definition at line 311 of file GenSort.h.

References casacore::GenSort< T >::sort().

◆ genSort() [2/2]

template<class T , class INX = uInt>
uInt casacore::genSort ( Vector< INX > &  indexVector,
const T *  data,
INX  nr,
Sort::Order  order = Sort::Ascending,
int  options = 0 
)
inline

Global indirect sort functions The following global functions easier to use than the static GenSortIndirect member functions.

They do an indirect sort of data, thus the data themselves are not moved. Rather an index vector is returned giving the sorted data indices.

The sorting method used is merge sort, which is always stable. It is the fastest, especially if it can use multiple threads.

Unlike the (see (name=genSortInPlace)) in-place sorting methods, all indirect sorting methods are stable (i.e. equal values are left in their original order).

All sort methods have an option to skip duplicate values. This is the only case where the returned number of values can be less than the original number of values.


Definition at line 357 of file GenSort.h.

References casacore::GenSortIndirect< T, INX >::sort().

◆ precisionForValueErrorPairs()

uInt casacore::precisionForValueErrorPairs ( const Vector< Double > &  pair1,
const Vector< Double > &  pair2 
)

Various precision-related functions

Intended use:

Public interface

Synopsis

Various functions for determining precision for printing.

Determine precision for two related value,error pairs (such as RA-Dec)