Skip to content

Commit

Permalink
Mark derived expressions as final (#679)
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul authored Jan 11, 2025
1 parent 8c2cbe7 commit 684e16f
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions include/sleipnir/autodiff/Expression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ struct Expression {
}
};

struct BinaryMinusExpression : Expression {
struct BinaryMinusExpression final : Expression {
/**
* Constructs a binary expression (an operator with two arguments).
*
Expand Down Expand Up @@ -398,7 +398,7 @@ struct BinaryMinusExpression : Expression {
}
};

struct BinaryPlusExpression : Expression {
struct BinaryPlusExpression final : Expression {
/**
* Constructs a binary expression (an operator with two arguments).
*
Expand Down Expand Up @@ -433,7 +433,7 @@ struct BinaryPlusExpression : Expression {
}
};

struct ConstExpression : Expression {
struct ConstExpression final : Expression {
/**
* Constructs a constant expression with a value of zero.
*/
Expand Down Expand Up @@ -467,7 +467,7 @@ struct ConstExpression : Expression {
}
};

struct DivExpression : Expression {
struct DivExpression final : Expression {
/**
* Constructs a binary expression (an operator with two arguments).
*
Expand Down Expand Up @@ -504,7 +504,7 @@ struct DivExpression : Expression {
}
};

struct MultExpression : Expression {
struct MultExpression final : Expression {
/**
* Constructs a binary expression (an operator with two arguments).
*
Expand Down Expand Up @@ -543,7 +543,7 @@ struct MultExpression : Expression {
}
};

struct UnaryMinusExpression : Expression {
struct UnaryMinusExpression final : Expression {
/**
* Constructs an unary expression (an operator with one argument).
*
Expand Down Expand Up @@ -621,7 +621,7 @@ inline constexpr void IntrusiveSharedPtrDecRefCount(Expression* expr) {
}
}

struct AbsExpression : Expression {
struct AbsExpression final : Expression {
/**
* Constructs an unary expression (an operator with one argument).
*
Expand Down Expand Up @@ -681,7 +681,7 @@ inline ExpressionPtr abs(const ExpressionPtr& x) {
return MakeExpressionPtr<AbsExpression>(kNonlinear, x);
}

struct AcosExpression : Expression {
struct AcosExpression final : Expression {
/**
* Constructs an unary expression (an operator with one argument).
*
Expand Down Expand Up @@ -729,7 +729,7 @@ inline ExpressionPtr acos(const ExpressionPtr& x) {
return MakeExpressionPtr<AcosExpression>(kNonlinear, x);
}

struct AsinExpression : Expression {
struct AsinExpression final : Expression {
/**
* Constructs an unary expression (an operator with one argument).
*
Expand Down Expand Up @@ -777,7 +777,7 @@ inline ExpressionPtr asin(const ExpressionPtr& x) {
return MakeExpressionPtr<AsinExpression>(kNonlinear, x);
}

struct AtanExpression : Expression {
struct AtanExpression final : Expression {
/**
* Constructs an unary expression (an operator with one argument).
*
Expand Down Expand Up @@ -824,7 +824,7 @@ inline ExpressionPtr atan(const ExpressionPtr& x) {
return MakeExpressionPtr<AtanExpression>(kNonlinear, x);
}

struct Atan2Expression : Expression {
struct Atan2Expression final : Expression {
/**
* Constructs a binary expression (an operator with two arguments).
*
Expand Down Expand Up @@ -886,7 +886,7 @@ inline ExpressionPtr atan2(const ExpressionPtr& y, const ExpressionPtr& x) {
return MakeExpressionPtr<Atan2Expression>(kNonlinear, y, x);
}

struct CosExpression : Expression {
struct CosExpression final : Expression {
/**
* Constructs an unary expression (an operator with one argument).
*
Expand Down Expand Up @@ -932,7 +932,7 @@ inline ExpressionPtr cos(const ExpressionPtr& x) {
return MakeExpressionPtr<CosExpression>(kNonlinear, x);
}

struct CoshExpression : Expression {
struct CoshExpression final : Expression {
/**
* Constructs an unary expression (an operator with one argument).
*
Expand Down Expand Up @@ -978,7 +978,7 @@ inline ExpressionPtr cosh(const ExpressionPtr& x) {
return MakeExpressionPtr<CoshExpression>(kNonlinear, x);
}

struct ErfExpression : Expression {
struct ErfExpression final : Expression {
/**
* Constructs an unary expression (an operator with one argument).
*
Expand Down Expand Up @@ -1027,7 +1027,7 @@ inline ExpressionPtr erf(const ExpressionPtr& x) {
return MakeExpressionPtr<ErfExpression>(kNonlinear, x);
}

struct ExpExpression : Expression {
struct ExpExpression final : Expression {
/**
* Constructs an unary expression (an operator with one argument).
*
Expand Down Expand Up @@ -1075,7 +1075,7 @@ inline ExpressionPtr exp(const ExpressionPtr& x) {

inline ExpressionPtr hypot(const ExpressionPtr& x, const ExpressionPtr& y);

struct HypotExpression : Expression {
struct HypotExpression final : Expression {
/**
* Constructs a binary expression (an operator with two arguments).
*
Expand Down Expand Up @@ -1136,7 +1136,7 @@ inline ExpressionPtr hypot(const ExpressionPtr& x, const ExpressionPtr& y) {
return MakeExpressionPtr<HypotExpression>(kNonlinear, x, y);
}

struct LogExpression : Expression {
struct LogExpression final : Expression {
/**
* Constructs an unary expression (an operator with one argument).
*
Expand Down Expand Up @@ -1183,7 +1183,7 @@ inline ExpressionPtr log(const ExpressionPtr& x) {
return MakeExpressionPtr<LogExpression>(kNonlinear, x);
}

struct Log10Expression : Expression {
struct Log10Expression final : Expression {
/**
* Constructs an unary expression (an operator with one argument).
*
Expand Down Expand Up @@ -1233,7 +1233,7 @@ inline ExpressionPtr log10(const ExpressionPtr& x) {

inline ExpressionPtr pow(const ExpressionPtr& base, const ExpressionPtr& power);

struct PowExpression : Expression {
struct PowExpression final : Expression {
/**
* Constructs a binary expression (an operator with two arguments).
*
Expand Down Expand Up @@ -1325,7 +1325,7 @@ inline ExpressionPtr pow(const ExpressionPtr& base,
base, power);
}

struct SignExpression : Expression {
struct SignExpression final : Expression {
/**
* Constructs an unary expression (an operator with one argument).
*
Expand Down Expand Up @@ -1379,7 +1379,7 @@ inline ExpressionPtr sign(const ExpressionPtr& x) {
return MakeExpressionPtr<SignExpression>(kNonlinear, x);
}

struct SinExpression : Expression {
struct SinExpression final : Expression {
/**
* Constructs an unary expression (an operator with one argument).
*
Expand Down Expand Up @@ -1426,7 +1426,7 @@ inline ExpressionPtr sin(const ExpressionPtr& x) {
return MakeExpressionPtr<SinExpression>(kNonlinear, x);
}

struct SinhExpression : Expression {
struct SinhExpression final : Expression {
/**
* Constructs an unary expression (an operator with one argument).
*
Expand Down Expand Up @@ -1473,7 +1473,7 @@ inline ExpressionPtr sinh(const ExpressionPtr& x) {
return MakeExpressionPtr<SinhExpression>(kNonlinear, x);
}

struct SqrtExpression : Expression {
struct SqrtExpression final : Expression {
/**
* Constructs an unary expression (an operator with one argument).
*
Expand Down Expand Up @@ -1522,7 +1522,7 @@ inline ExpressionPtr sqrt(const ExpressionPtr& x) {
return MakeExpressionPtr<SqrtExpression>(kNonlinear, x);
}

struct TanExpression : Expression {
struct TanExpression final : Expression {
/**
* Constructs an unary expression (an operator with one argument).
*
Expand Down Expand Up @@ -1570,7 +1570,7 @@ inline ExpressionPtr tan(const ExpressionPtr& x) {
return MakeExpressionPtr<TanExpression>(kNonlinear, x);
}

struct TanhExpression : Expression {
struct TanhExpression final : Expression {
/**
* Constructs an unary expression (an operator with one argument).
*
Expand Down

0 comments on commit 684e16f

Please sign in to comment.