OpenMS
Loading...
Searching...
No Matches
Concept

OpenMS concepts (types, macros, ...) More...

Collaboration diagram for Concept:

Modules

 Class test macros
 These macros are used by the test programs in the subdirectory OpenMS/source/TEST.
 
 Exceptions
 Exceptions.
 
 Condition macros
 Macros used for to enforce preconditions and postconditions.
 

Namespaces

namespace  OpenMS::Constants
 Mathematical and physical constants namespace.
 
namespace  OpenMS::Exception
 Exception namespace
 
namespace  OpenMS::Logger
 Log streams.
 
namespace  OpenMS::Math
 Math namespace.
 

Classes

class  LogConfigHandler
 The LogConfigHandler provides the functionality to configure the internal logging of OpenMS algorithms that use the global instances of LogStream. More...
 
class  StreamHandler
 Provides a central class to register globally used output streams. Currently supported streams are. More...
 
class  UniqueIdGenerator
 A generator for unique ids. More...
 
class  UniqueIdInterface
 A base class defining a common interface for all classes having a unique id. More...
 
class  VersionInfo
 Version information class. More...
 

Typedefs

typedef int32_t Int32
 Signed integer type (32bit)
 
typedef uint32_t UInt32
 Unsigned integer type (32bit)
 
typedef int64_t Int64
 Signed integer type (64bit)
 
typedef uint64_t UInt64
 Unsigned integer type (64bit)
 
typedef time_t Time
 Time type.
 
typedef unsigned int UInt
 Unsigned integer type.
 
typedef int Int
 Signed integer type.
 
typedef uint8_t Byte
 Byte type.
 
typedef uint64_t UID
 A unique object ID (as unsigned 64bit type).
 
typedef size_t Size
 Size type e.g. used as variable which can hold result of size()
 
typedef ptrdiff_t SignedSize
 Signed Size type e.g. used as pointer difference.
 

Functions

std::size_t fnv1a_hash_bytes (const void *data, std::size_t size) noexcept
 Hash utilities for OpenMS classes.
 

Detailed Description

OpenMS concepts (types, macros, ...)

Typedef Documentation

◆ Byte

typedef uint8_t Byte

Byte type.

Use this type to represent byte data (8 bit length). A Byte is always unsigned.

◆ Int

typedef int Int

Signed integer type.

◆ Int32

typedef int32_t Int32

Signed integer type (32bit)

◆ Int64

typedef int64_t Int64

Signed integer type (64bit)

◆ SignedSize

typedef ptrdiff_t SignedSize

Signed Size type e.g. used as pointer difference.

◆ Size

typedef size_t Size

Size type e.g. used as variable which can hold result of size()

◆ Time

typedef time_t Time

Time type.

Use this type to represent a point in time (as a synonym for time_t).

◆ UID

typedef uint64_t UID

A unique object ID (as unsigned 64bit type).

See also
PersistentObject

◆ UInt

typedef unsigned int UInt

Unsigned integer type.

◆ UInt32

typedef uint32_t UInt32

Unsigned integer type (32bit)

◆ UInt64

typedef uint64_t UInt64

Unsigned integer type (64bit)

Function Documentation

◆ fnv1a_hash_bytes()

std::size_t fnv1a_hash_bytes ( const void *  data,
std::size_t  size 
)
inlinenoexcept

Hash utilities for OpenMS classes.

This header provides hash functions that are:

  • Consistent: Equal inputs produce equal hashes
  • Fast: Uses efficient FNV-1a algorithm
  • Low collision: Uses proper hash combining with golden ratio mixing
Note
These hash functions satisfy the requirements for std::unordered_map/set: if a == b, then hash(a) == hash(b). When used with stable identifiers (strings, not pointers), hashes are reproducible across process runs on the same platform. Not suitable for cross-platform persistent storage due to endianness and size_t differences.

FNV-1a hash for a byte sequence.

FNV-1a is a non-cryptographic hash function that is:

  • Fast: Only XOR and multiply per byte
  • Simple: Easy to implement and verify
  • Good distribution: Well-tested for hash table use
Parameters
dataPointer to data bytes
sizeNumber of bytes
Returns
Hash value (size_t)

Referenced by OpenMS::fnv1a_hash_string(), OpenMS::hash_float(), and OpenMS::hash_int().