GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
argmax.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2007,2013,2018 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef ARGMAX_H
12 #define ARGMAX_H
13 
14 #include <gnuradio/blocks/api.h>
15 #include <gnuradio/sync_block.h>
16 #include <cstdint>
17 
18 namespace gr {
19 namespace blocks {
20 
21 /*!
22  * \brief Compares vectors from multiple streams and determines
23  * the index in the vector and stream number where the maximum
24  * value occurred.
25  * \ingroup math_operators_blk
26  *
27  * \details
28  * Data is passed in as a vector of length \p vlen from multiple
29  * input sources. It will look through these streams of \p vlen
30  * data items and output two streams:
31  *
32  * \li Stream 0 will contain the index value in the vector where
33  * the maximum value occurred.
34  *
35  * \li Stream 1 will contain the number of the input stream that
36  * held the maximum value.
37  */
38 template <class T>
39 class BLOCKS_API argmax : virtual public sync_block
40 {
41 public:
42  typedef std::shared_ptr<argmax<T>> sptr;
43 
44  static sptr make(size_t vlen);
45 };
46 
50 } /* namespace blocks */
51 } /* namespace gr */
52 
53 #endif /* ARGMAX_H */
Compares vectors from multiple streams and determines the index in the vector and stream number where...
Definition: argmax.h:40
static sptr make(size_t vlen)
std::shared_ptr< argmax< T > > sptr
Definition: argmax.h:42
synchronous 1:1 input to output with history
Definition: sync_block.h:26
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:18
argmax< std::int16_t > argmax_ss
Definition: argmax.h:49
argmax< std::int32_t > argmax_is
Definition: argmax.h:48
argmax< float > argmax_fs
Definition: argmax.h:47
GNU Radio logging wrapper.
Definition: basic_block.h:29