Loading...
Searching...
No Matches
exponentiate_const_cci.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2017 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef INCLUDED_BLOCKS_EXPONENTIATE_CONST_CCI_H
#define INCLUDED_BLOCKS_EXPONENTIATE_CONST_CCI_H
#include <gnuradio/blocks/api.h>
#include <gnuradio/sync_block.h>
namespace gr {
namespace blocks {
/*!
* \brief Exponentiates a complex stream with an integer exponent
* \ingroup blocks
*
* \details
* This block raises a complex stream to an integer exponent. The exponent
* must be at least 1. There is a callback function so the exponent can be
* changed at runtime.
*
* NOTE: The algorithm uses iterative multiplication to achieve exponentiation,
* hence it is O(exponent). Therefore, this block could be inefficient for large
* exponents.
*/
class BLOCKS_API exponentiate_const_cci : virtual public gr::sync_block
{
public:
typedef std::shared_ptr<exponentiate_const_cci> sptr;
/*
* \param exponent Exponent the input stream is raised to, which must be an integer.
* The algorithm uses iterative multiplication to achieve exponentiation, hence it is
* O(exponent). Therefore, this block could be inefficient for large exponents.
* \param vlen Vector length of input/output stream
*/
static sptr make(int exponent, size_t vlen = 1);
virtual void set_exponent(int exponent) = 0;
};
} // namespace blocks
} // namespace gr
#endif /* INCLUDED_BLOCKS_EXPONENTIATE_CONST_CCI_H */
gr::blocks::exponentiate_const_cci
Exponentiates a complex stream with an integer exponent.
Definition exponentiate_const_cci.h:35
gr::blocks::exponentiate_const_cci::make
static sptr make(int exponent, size_t vlen=1)
gr::blocks::exponentiate_const_cci::sptr
std::shared_ptr< exponentiate_const_cci > sptr
Definition exponentiate_const_cci.h:37
gr::blocks::exponentiate_const_cci::set_exponent
virtual void set_exponent(int exponent)=0
gr::sync_block
synchronous 1:1 input to output with history
Definition sync_block.h:26
api.h
BLOCKS_API
#define BLOCKS_API
Definition gr-blocks/include/gnuradio/blocks/api.h:18
gr::blocks
Definition abs_blk.h:20
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
sync_block.h