| OpenMS 2.5.0

List of all members
MetaInfoInterfaceUtils Class Reference

Utilities operating on containers inheriting from MetaInfoInterface. More...

`#include <OpenMS/METADATA/MetaInfoInterfaceUtils.h>`

## Methods to find key sets

template<typename T_In , typename T_Out >
static T_Out | findCommonMetaKeys (const typename T_In::const_iterator &it_start, const typename T_In::const_iterator &it_end, float min_frequency)
| Find keys in a collection of MetaInfoInterface objects which reach a certain frequency threshold. More...
| MetaInfoInterfaceUtils ()
| hide c'tors to avoid instantiation of utils class More...
| MetaInfoInterfaceUtils (const MetaInfoInterfaceUtils &)
MetaInfoInterfaceUtils & | operator= (MetaInfoInterfaceUtils &)

## Detailed Description

Utilities operating on containers inheriting from MetaInfoInterface.

## Constructor & Destructor Documentation

## ◆ MetaInfoInterfaceUtils() [1/2]

MetaInfoInterfaceUtils | ( |  | ) |

private

hide c'tors to avoid instantiation of utils class

## ◆ MetaInfoInterfaceUtils() [2/2]

MetaInfoInterfaceUtils | ( | const MetaInfoInterfaceUtils & |  | ) |

private

## Member Function Documentation

## ◆ findCommonMetaKeys()

static T_Out findCommonMetaKeys | ( | const typename T_In::const_iterator & | it_start,
|  | const typename T_In::const_iterator & | it_end,
|  | float | min_frequency
| ) |  |

inline static

Find keys in a collection of MetaInfoInterface objects which reach a certain frequency threshold.

Searches the given iterator range for the keys of each element's MetaInfoInterface keys and returns those keys, which reach a certain frequency threshold. Common use cases are `min_frequency` = 0 (i.e. take any key which occurs) and `min_frequency` = 100 (i.e. take only keys which are common to all elements in the iterator range).

Template Parameters

  T_In | Input container (e.g. std::vector or alike), containing objects which implement the MetaInfoInterface (i.e. support 'getKeys()')
  T_Out | Output container of type T<String> (e.g. std::set<String>)

Parameters

  start | Iterator pointing to the initial position to search. (note: this does not need to correspond to the beginning of the container)
  end | Iterator pointing to the end final position to search.
  min_frequency | Minimum required frequency (in percent). Must be between 0-100. Other values are corrected to the closest value allowed.

Returns
  Returns a vector/list/set of keys passing the frequency criterion.

## ◆ operator=()

MetaInfoInterfaceUtils& operator= | ( | MetaInfoInterfaceUtils & |  | ) |

private