# ExponentialFunction Class

> An interpolation between two output values as input values vary across a domain.

- Product: Adobe PDF Library 21
- Language: Modern C++
- Version: 21.4.0
- HTML page: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ExponentialFunction
- Version index: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/llms.txt

```cpp
class ExponentialFunction : Function
```

**Namespace:** `datalogics_interface`

**Inherits from:** [`Function`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Function.md)

## Description

An interpolation between two output values as input values vary across a domain.

For an Exponential Function, the curve between the two values is determined by the exponent N.

## Constructors

### ExponentialFunction

```cpp
datalogics_interface::ExponentialFunction::ExponentialFunction(const std::vector< double > &domain, int n_outputs, const std::vector< double > &c0, const std::vector< double > &c1, double n)
```

*constructor*

**Parameters**

- `domain` (`const std::vector< double > &`): the domain of the function. 2 elements.
- `n_outputs` (`int`): the number of outputs of the function
- `c0` (`const std::vector< double > &`): the output value when the input value is 0
- `c1` (`const std::vector< double > &`): the output value when the input value is 1
- `n` (`double`): the exponential factor, which alters the curve of output values as the input values vary across the domain.

Create an Exponential Function, which is the exponential interpolation between two output values as the input values vary across the domain.

### ExponentialFunction

```cpp
datalogics_interface::ExponentialFunction::ExponentialFunction(ExponentialFunction &&) noexcept
```

*constructor*

**Parameters**

- (unnamed) ([`ExponentialFunction &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ExponentialFunction.md))

### ~ExponentialFunction

```cpp
datalogics_interface::ExponentialFunction::~ExponentialFunction() override
```

*destructor*

## Methods

### apply

```cpp
std::vector< double > datalogics_interface::Function::apply(const std::vector< double > &args) const
```

**Parameters**

- `args` (`const std::vector< double > &`): input values for the function. The number of input values must agree with the number of inputs the function takes.

**Returns:** `std::vector< double >`

a list of the result values from the function

Apply the function to supplied input values

### get_c0

```cpp
std::vector< double > datalogics_interface::ExponentialFunction::get_c0() const
```

**Returns:** `std::vector< double >`

The values for the function when the input is 0.0. There must be the same number of values as the number of outputs in the function.

### get_c1

```cpp
std::vector< double > datalogics_interface::ExponentialFunction::get_c1() const
```

**Returns:** `std::vector< double >`

The values for the function when the input is 1.0. There must be the same number of values as the number of outputs in the function.

### get_domain

```cpp
std::vector< double > datalogics_interface::Function::get_domain() const
```

**Returns:** `std::vector< double >`

The domain of the function.

Contains 2 * m elements, where m is the number of inputs to the function. Each successive pair of elements gives the minimum and maximum values for one of the inputs. Input values to the function are clamped to these minimum and maximum values.

### get_n

```cpp
double datalogics_interface::ExponentialFunction::get_n() const
```

**Returns:** `double`

The exponential factor N.

### get_n_inputs

```cpp
int datalogics_interface::Function::get_n_inputs() const
```

**Returns:** `int`

The number of inputs to the function.

### get_n_outputs

```cpp
int datalogics_interface::Function::get_n_outputs() const
```

**Returns:** `int`

The number of outputs from the function.

### operator=

```cpp
ExponentialFunction & datalogics_interface::ExponentialFunction::operator=(ExponentialFunction &&) noexcept
```

**Parameters**

- (unnamed) ([`ExponentialFunction &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ExponentialFunction.md))

**Returns:** [`ExponentialFunction &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ExponentialFunction.md)

### set_c0

```cpp
void datalogics_interface::ExponentialFunction::set_c0(const std::vector< double > &c0)
```

**Parameters**

- `c0` (`const std::vector< double > &`): the values for the function when the input is 0.0. There must be the same number of values as the number of outputs i...

**Returns:** `void`

The values for the function when the input is 0.0. There must be the same number of values as the number of outputs in the function.

### set_c1

```cpp
void datalogics_interface::ExponentialFunction::set_c1(const std::vector< double > &c1)
```

**Parameters**

- `c1` (`const std::vector< double > &`): the values for the function when the input is 1.0. There must be the same number of values as the number of outputs i...

**Returns:** `void`

The values for the function when the input is 1.0. There must be the same number of values as the number of outputs in the function.

### set_domain

```cpp
void datalogics_interface::Function::set_domain(const std::vector< double > &domain)
```

**Parameters**

- `domain` (`const std::vector< double > &`)

**Returns:** `void`

The domain of the function.

Contains 2 * m elements, where m is the number of inputs to the function. Each successive pair of elements gives the minimum and maximum values for one of the inputs. Input values to the function are clamped to these minimum and maximum values.

### set_n

```cpp
void datalogics_interface::ExponentialFunction::set_n(double n)
```

**Parameters**

- `n` (`double`)

**Returns:** `void`

The exponential factor N.

### to_string

```cpp
std::string datalogics_interface::ExponentialFunction::to_string() const override
```

**Returns:** `std::string`

A string representation of the ExponentialFunction, including the number of inputs and outputs, domain, range, N, C0, and C1 values.

A string value describing the function.
