Numworks Epsilon
1.4.1
Graphing Calculator Operating System
opposite.h
Go to the documentation of this file.
1
#ifndef POINCARE_OPPOSITE_H
2
#define POINCARE_OPPOSITE_H
3
4
#include <
poincare/static_hierarchy.h
>
5
#include <
poincare/layout_engine.h
>
6
#include <
poincare/approximation_engine.h
>
7
8
namespace
Poincare
{
9
10
class
Opposite
:
public
StaticHierarchy
<1> {
11
using
StaticHierarchy<1>::StaticHierarchy
;
12
public
:
13
Expression
*
clone
()
const override
;
14
Type
type
()
const override
;
15
int
polynomialDegree
(
char
symbolName)
const override
;
16
Sign
sign
()
const override
;
17
template
<
typename
T>
static
Complex<T>
compute
(
const
Complex<T>
c
,
AngleUnit
angleUnit);
18
private
:
19
/* Layout */
20
bool
needParenthesisWithParent(
const
Expression
* e)
const override
;
21
ExpressionLayout
* privateCreateLayout(
PrintFloat::Mode
floatDisplayMode,
ComplexFormat
complexFormat)
const override
;
22
int
writeTextInBuffer(
char
* buffer,
int
bufferSize,
int
numberOfSignificantDigits = PrintFloat::k_numberOfStoredSignificantDigits)
const override
;
23
/* Simplification */
24
Expression
* shallowReduce(
Context
& context,
AngleUnit
angleUnit)
override
;
25
/* Evaluation */
26
Expression
* privateApproximate(
SinglePrecision
p,
Context
& context,
AngleUnit
angleUnit)
const override
{
27
return
ApproximationEngine::map<float>(
this
, context, angleUnit, compute<float>);
28
}
29
Expression
* privateApproximate(
DoublePrecision
p,
Context
& context,
AngleUnit
angleUnit)
const override
{
30
return
ApproximationEngine::map<double>(
this
, context, angleUnit, compute<double>);
31
}
32
};
33
34
}
35
36
#endif
Poincare::Opposite::clone
Expression * clone() const override
Definition:
opposite.cpp:21
Poincare::Context
Definition:
context.h:9
Poincare::Opposite::polynomialDegree
int polynomialDegree(char symbolName) const override
Definition:
opposite.cpp:26
Poincare
Definition:
absolute_value.h:8
layout_engine.h
Poincare::Opposite::compute
static Complex< T > compute(const Complex< T > c, AngleUnit angleUnit)
Definition:
opposite.cpp:48
Poincare::PrintFloat::Mode
Mode
Definition:
print_float.h:15
Poincare::Expression::ComplexFormat
ComplexFormat
Definition:
expression.h:148
c
c(generic_all_nodes)
Poincare::Expression::Sign
Sign
Definition:
expression.h:190
Poincare::Expression::AngleUnit
AngleUnit
Definition:
expression.h:153
Poincare::Complex
Definition:
complex.h:12
Poincare::ExpressionLayout
Definition:
expression_layout.h:8
Poincare::Opposite
Definition:
opposite.h:10
Poincare::Expression::SinglePrecision
float SinglePrecision
Definition:
expression.h:245
Poincare::Opposite::sign
Sign sign() const override
Definition:
opposite.cpp:30
approximation_engine.h
Poincare::Expression::Type
Type
Definition:
expression.h:84
Poincare::Opposite::type
Type type() const override
Definition:
opposite.cpp:17
Poincare::Expression
Definition:
expression.h:16
Poincare::StaticHierarchy
Definition:
static_hierarchy.h:10
static_hierarchy.h
Poincare::Expression::DoublePrecision
double DoublePrecision
Definition:
expression.h:246
epsilon
poincare
include
poincare
opposite.h
Generated by
1.8.14