PDF SDK Documentation

Comprehensive Guide for Developers: Features, Integration, and API Reference

Loading...
Searching...
No Matches

Represents a function that maps input values to output values. More...

#include <pdfsdk/cxx/function.h>

Inheritance diagram for PDF::Function:

Public Member Functions

Object GetPdfObject () const
 Get the PDF object associated with this function.
size_t GetNumInputs () const
 Get the number of input values.
size_t GetNumOutputs () const
 Get the number of output values.
void Execute (std::span< const float > inputs, std::span< float > outputs)
 Evaluates the function, writing the result into a caller-provided buffer.
std::vector< float > Execute (std::span< const float > inputs)
 Evaluates the function for the specified input values.
 Function (PDEFunction handle, bool adopt=false) noexcept
 Function (const Function &rhs) noexcept
Function & operator= (const Function &rhs) noexcept
 Function (Function &&rhs) noexcept
Function & operator= (Function &&rhs) noexcept

Static Public Member Functions

static Function CreateFromPdfObject (const Object &object)
 Creates a function from the specified PDF object.

Detailed Description

Represents a function that maps input values to output values.

ISO 32000-2:2020 - 7.10 Functions

Member Function Documentation

◆ CreateFromPdfObject()

Function PDF::Function::CreateFromPdfObject ( const Object & object)
static

Creates a function from the specified PDF object.

Parameters
objectThe PDF object.
Returns
The function.

◆ Execute() [1/2]

std::vector< float > PDF::Function::Execute ( std::span< const float > inputs)

Evaluates the function for the specified input values.

Parameters
[in]inputsThe input values; at least GetNumInputs() of them.
Returns
The GetNumOutputs() output values.

◆ Execute() [2/2]

void PDF::Function::Execute ( std::span< const float > inputs,
std::span< float > outputs )

Evaluates the function, writing the result into a caller-provided buffer.

Avoids allocating the output buffer on every call; prefer it in hot loops. Hidden from language bindings, which use the returning overload above.

Parameters
[in]inputsThe input values; at least GetNumInputs() of them.
[out]outputsThe output buffer; at least GetNumOutputs() long.

◆ GetNumInputs()

size_t PDF::Function::GetNumInputs ( ) const

Get the number of input values.

Returns
The number of input values.

◆ GetNumOutputs()

size_t PDF::Function::GetNumOutputs ( ) const

Get the number of output values.

Returns
The number of output values.

◆ GetPdfObject()

Object PDF::Function::GetPdfObject ( ) const

Get the PDF object associated with this function.

Returns
The PDF object.

The documentation for this class was generated from the following file: