Loading...
Searching...
No Matches
Function.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3// Consult legal.txt regarding legal and license information.
4//---------------------------------------------------------------------------------------
5#ifndef PDFTRON_H_CPPPDFFunction
6#define PDFTRON_H_CPPPDFFunction
7
8#include <C/PDF/TRN_Function.h>
9#include <SDF/Obj.h>
10
11
12 namespace pdftron {
13 namespace PDF {
14
15
28 class Function
29{
30 public:
31
36 Function (SDF::Obj funct_dict = 0);
37 Function(const Function& f);
38 Function& operator=(const Function& f);
39 ~Function();
40
41 enum Type
42 {
43 e_sampled = 0, // uses a table of sample values to define the function.
44 e_exponential = 2, // defines a set of coefficients for an exponential function.
45 e_stitching = 3, // a combination of other functions, partitioned across a domain.
46 e_postscript = 4 // A PostScript calculator function.
47 };
48
52 Type GetType() const;
53
57 int GetInputCardinality();
58
62 int GetOutputCardinality();
63
71 std::vector<double> Eval(const std::vector<double>& in_arr);
72
73#ifndef SWIG
74 void Eval(double *in, double *out);
75#endif
76
80 SDF::Obj GetSDFObj ();
81
85 void Destroy();
86
87// @cond PRIVATE_DOC
88#ifndef SWIGHIDDEN
89 Function(TRN_Function impl);
90 TRN_Function mp_func;
91#endif
92// @endcond
93};
94
95
96#include <Impl/Function.inl>
97
98 }; // namespace PDF
99}; // namespace pdftron
100
101#endif // PDFTRON_H_CPPPDFFunction
Obj.h
pdftron::PDF::Function::Function
Function(const Function &f)
pdftron::PDF::Function::Eval
std::vector< double > Eval(const std::vector< double > &in_arr)
pdftron::PDF::Function::~Function
~Function()
pdftron::PDF::Function::Eval
void Eval(double *in, double *out)
pdftron::PDF::Function::GetOutputCardinality
int GetOutputCardinality()
pdftron::PDF::Function::Function
Function(SDF::Obj funct_dict=0)
pdftron::PDF::Function::Destroy
void Destroy()
pdftron::PDF::Function::GetInputCardinality
int GetInputCardinality()
pdftron::PDF::Function::operator=
Function & operator=(const Function &f)
pdftron::PDF::Function::GetSDFObj
SDF::Obj GetSDFObj()
pdftron::PDF::Function::GetType
Type GetType() const
pdftron::PDF::Function::Type
Type
Definition Function.h:42
pdftron::PDF::Function::e_postscript
@ e_postscript
Definition Function.h:46
pdftron::PDF::Function::e_exponential
@ e_exponential
Definition Function.h:44
pdftron::PDF::Function::e_sampled
@ e_sampled
Definition Function.h:43
pdftron::PDF::Function::e_stitching
@ e_stitching
Definition Function.h:45
pdftron::SDF::Obj
Definition Obj.h:41
pdftron::PDF
Definition Action.h:15
pdftron
Definition BasicTypes.h:10