#include <HxScalarDouble.h>
Constructors | |
| HxScalarDouble () | |
| Default constructor. More... | |
| HxScalarDouble (double v) | |
| Conversion from native type. More... | |
| HxScalarDouble (const HxScalarDouble &rhs) | |
| Copy constructor. More... | |
Inquiry | |
| int | dim () const |
| Dimensionality. More... | |
| double | x () const |
| Value of (first) element. More... | |
| double | getValue (int dimension) const |
| Element in given dimension. More... | |
| void | setValue (int dimension, double value) |
Conversion | |
| operator HxScalarInt () const | |
| Cast to HxScalarInt. More... | |
| operator HxVec2Int () const | |
| Cast to HxVec2Int. More... | |
| operator HxVec2Double () const | |
| Cast to HxVec2Double. More... | |
| operator HxVec3Int () const | |
| Cast to HxVec3Int. More... | |
| operator HxVec3Double () const | |
| Cast to HxVec3Double. More... | |
| operator HxComplex () const | |
| Cast to HxComplex. More... | |
Operators | |
| Mathematical definition: Binary operations on pixel values | |
| int | operator== (const HxScalarDouble &v) const |
| Equal. More... | |
| int | operator!= (const HxScalarDouble &v) const |
| Not equal. More... | |
| int | operator< (const HxScalarDouble &v) const |
| Less than. More... | |
| int | operator<= (const HxScalarDouble &v) const |
| Less equal. More... | |
| int | operator> (const HxScalarDouble &v) const |
| Greater than. More... | |
| int | operator>= (const HxScalarDouble &v) const |
| Greater equal. More... | |
| const HxScalarDouble | SMALL_VAL = -1e300 |
| A small value w.r.t to the comparison operators "<" and ">". More... | |
| const HxScalarDouble | LARGE_VAL = 1e300 |
| A large value w.r.t to the comparison operators "<" and ">". More... | |
Unary operations | |
| Mathematical definition: Unary operations on pixel values | |
| HxScalarDouble | operator- () const |
| Negation. More... | |
| HxScalarDouble | complement () const |
| Complement. More... | |
| HxScalarDouble | abs () const |
| Absolute value. More... | |
| HxScalarDouble | ceil () const |
| Ceiling. More... | |
| HxScalarDouble | floor () const |
| Floor. More... | |
| HxScalarDouble | round () const |
| Round. More... | |
| HxScalarDouble | sum () const |
| Sum. More... | |
| HxScalarDouble | product () const |
| Product. More... | |
| HxScalarDouble | min () const |
| Minimum. More... | |
| HxScalarDouble | max () const |
| Maximum. More... | |
| HxScalarDouble | norm1 () const |
| L1 norm. More... | |
| HxScalarDouble | norm2 () const |
| L2 norm. More... | |
| HxScalarDouble | normInf () const |
| L infinity norm. More... | |
| HxScalarDouble | sqrt () const |
| Square root. More... | |
| HxScalarDouble | sin () const |
| Sine. More... | |
| HxScalarDouble | cos () const |
| Cosine. More... | |
| HxScalarDouble | tan () const |
| Tangent. More... | |
| HxScalarDouble | asin () const |
| Arc sine. More... | |
| HxScalarDouble | acos () const |
| Arc cosine. More... | |
| HxScalarDouble | atan () const |
| Arc tangent. More... | |
| HxScalarDouble | atan2 () const |
| Arc tangent. More... | |
| HxScalarDouble | sinh () const |
| Hyperbolic sine. More... | |
| HxScalarDouble | cosh () const |
| Hyperbolic cosine. More... | |
| HxScalarDouble | tanh () const |
| Hyperbolic tangent. More... | |
| HxScalarDouble | exp () const |
| Exponent. More... | |
| HxScalarDouble | log () const |
| Natural logarithm. More... | |
| HxScalarDouble | log10 () const |
| Base 10 logarithm. More... | |
Binary operations | |
| Mathematical definition: Binary operations on pixel values | |
| HxScalarDouble & | operator+= (const HxScalarDouble &v) |
| Addition and assignment. More... | |
| HxScalarDouble & | operator-= (const HxScalarDouble &v) |
| Subtraction and assignment. More... | |
| HxScalarDouble & | operator *= (const HxScalarDouble &v) |
| Multiplication and assignment. More... | |
| HxScalarDouble & | operator/= (const HxScalarDouble &v) |
| Division and assignment. More... | |
| HxScalarDouble | min (const HxScalarDouble &v) const |
| Minimum. More... | |
| HxScalarDouble & | minAssign (const HxScalarDouble &v) |
| Minimum and assignment. More... | |
| HxScalarDouble | max (const HxScalarDouble &v) const |
| Maximum. More... | |
| HxScalarDouble & | maxAssign (const HxScalarDouble &v) |
| Maximum and assignment. More... | |
| HxScalarDouble | inf (const HxScalarDouble &v) const |
| Infimum. More... | |
| HxScalarDouble & | infAssign (const HxScalarDouble &v) |
| Infimum and assignment. More... | |
| HxScalarDouble | sup (const HxScalarDouble &v) const |
| Supremum. More... | |
| HxScalarDouble & | supAssign (const HxScalarDouble &v) |
| Supremum and assignment. More... | |
| HxScalarDouble | pow (const HxScalarDouble &v) const |
| Power. More... | |
| HxScalarDouble | mod (const HxScalarDouble &v) const |
| Modulo. More... | |
| HxScalarDouble | and (const HxScalarDouble &v) const |
| And. More... | |
| HxScalarDouble | or (const HxScalarDouble &v) const |
| Or. More... | |
| HxScalarDouble | xor (const HxScalarDouble &v) const |
| Xor. More... | |
| HxScalarDouble | leftShift (const HxScalarDouble &v) const |
| Left shift. More... | |
| HxScalarDouble | rightShift (const HxScalarDouble &v) const |
| Right shift. More... | |
| HxScalarDouble | dot (const HxScalarDouble &v) const |
| Dot product. More... | |
| HxScalarDouble | cross (const HxScalarDouble &v) const |
| Cross product. More... | |
| HxScalarDouble | operator+ (const HxScalarDouble &v1, const HxScalarDouble &v2) |
| Addition. More... | |
| HxScalarDouble | operator- (const HxScalarDouble &v1, const HxScalarDouble &v2) |
| Subtraction. More... | |
| HxScalarDouble | operator * (const HxScalarDouble &v1, const HxScalarDouble &v2) |
| Multiplication. More... | |
| HxScalarDouble | operator/ (const HxScalarDouble &v1, const HxScalarDouble &v2) |
| Division. More... | |
Output | |
| STD_OSTREAM & | put (STD_OSTREAM &os) const |
| Print value on stream. More... | |
| HxString | toString () const |
| Value as a string. More... | |
Public Methods | |
| void * | operator new (size_t, void *=0) |
| HxScalarDouble & | operator= (const double &v) |
| HxScalarDouble & | operator= (const HxScalarDouble &rhs) |
|
|
Default constructor.
00320 {
00321 }
|
|
|
Conversion from native type.
00325 : _value(v)
00326 {
00327 }
|
|
|
Copy constructor.
00331 : _value(rhs._value) 00332 { 00333 } |
|
|
Dimensionality.
00357 {
00358 return 1;
00359 }
|
|
|
Value of (first) element.
00363 {
00364 return _value;
00365 }
|
|
|
Element in given dimension.
00369 {
00370 return _value;
00371 }
|
|
|
Cast to HxScalarInt.
00026 {
00027 return int(_value);
00028 }
|
|
|
Cast to HxVec2Int.
00031 {
00032 return HxVec2Int(int(_value), int(_value));
00033 }
|
|
|
Cast to HxVec2Double.
00036 {
00037 return HxVec2Double(_value, _value);
00038 }
|
|
|
Cast to HxVec3Int.
00041 {
00042 return HxVec3Int(int(_value), int(_value), int(_value));
00043 }
|
|
|
Cast to HxVec3Double.
00046 {
00047 return HxVec3Double(_value, _value, _value);
00048 }
|
|
|
Cast to HxComplex.
00051 {
00052 return HxComplex(_value, 0.0);
00053 }
|
|
|
Equal.
00387 {
00388 return (_value == v._value);
00389 }
|
|
|
Not equal.
00393 {
00394 return (_value != v._value);
00395 }
|
|
|
Less than.
00399 {
00400 return (_value < v._value);
00401 }
|
|
|
Less equal.
00405 {
00406 return (_value <= v._value);
00407 }
|
|
|
Greater than.
00411 {
00412 return (_value > v._value);
00413 }
|
|
|
Greater equal.
00417 {
00418 return (_value >= v._value);
00419 }
|
|
|
Negation.
00423 {
00424 return HxScalarDouble(-_value);
00425 }
|
|
|
Complement.
00429 {
00430 return HxScalarDouble(-_value);
00431 }
|
|
|
Absolute value.
00435 {
00436 return HxScalarDouble(fabs(_value));
00437 }
|
|
|
Ceiling.
00441 {
00442 return HxScalarDouble(::ceil(_value));
00443 }
|
|
|
Floor.
00447 {
00448 return HxScalarDouble(::floor(_value));
00449 }
|
|
|
Round.
00453 {
00454 return HxScalarDouble((int) (_value + ((_value >= 0) ? 0.5 : -0.5)));
00455 }
|
|
|
Sum.
00459 {
00460 return *this;
00461 }
|
|
|
Product.
00465 {
00466 return *this;
00467 }
|
|
|
Minimum.
00471 {
00472 return *this;
00473 }
|
|
|
Maximum.
00477 {
00478 return *this;
00479 }
|
|
|
L1 norm.
00483 {
00484 return HxScalarDouble(fabs(_value));
00485 }
|
|
|
L2 norm.
00057 {
00058 return HxScalarDouble(fabs(_value));
00059 }
|
|
|
L infinity norm.
00489 {
00490 return HxScalarDouble(fabs(_value));
00491 }
|
|
|
Square root.
00495 {
00496 return HxScalarDouble(::sqrt(_value));
00497 }
|
|
|
Sine.
00501 {
00502 return HxScalarDouble(::sin(_value));
00503 }
|
|
|
Cosine.
00507 {
00508 return HxScalarDouble(::cos(_value));
00509 }
|
|
|
Tangent.
00513 {
00514 return HxScalarDouble(::tan(_value));
00515 }
|
|
|
Arc sine.
00519 {
00520 return HxScalarDouble(::asin(_value));
00521 }
|
|
|
Arc cosine.
00525 {
00526 return HxScalarDouble(::acos(_value));
00527 }
|
|
|
Arc tangent.
00531 {
00532 return HxScalarDouble(::atan(_value));
00533 }
|
|
|
Arc tangent.
00063 {
00064 return HxScalarDouble(::atan(_value));
00065 }
|
|
|
Hyperbolic sine.
00537 {
00538 return HxScalarDouble(::sinh(_value));
00539 }
|
|
|
Hyperbolic cosine.
00543 {
00544 return HxScalarDouble(::cosh(_value));
00545 }
|
|
|
Hyperbolic tangent.
00549 {
00550 return HxScalarDouble(::tanh(_value));
00551 }
|
|
|
Exponent.
00555 {
00556 return HxScalarDouble(::exp(_value));
00557 }
|
|
|
Natural logarithm.
00561 {
00562 return HxScalarDouble(::log(_value));
00563 }
|
|
|
Base 10 logarithm.
00567 {
00568 return HxScalarDouble(::log10(_value));
00569 }
|
|
|
Addition and assignment.
00573 {
00574 _value += v._value;
00575 return *this;
00576 }
|
|
|
Subtraction and assignment.
00580 {
00581 _value -= v._value;
00582 return *this;
00583 }
|
|
|
Multiplication and assignment.
00587 {
00588 _value *= v._value;
00589 return *this;
00590 }
|
|
|
Division and assignment.
00594 {
00595 _value /= v._value;
00596 return *this;
00597 }
|
|
|
Minimum.
00625 {
00626 return (operator<(v)) ? (*this) : v;
00627 }
|
|
|
Minimum and assignment.
00631 {
00632 if (operator<(v))
00633 return *this;
00634 operator=(v);
00635 return *this;
00636 }
|
|
|
Maximum.
00640 {
00641 return (operator>(v)) ? (*this) : v;
00642 }
|
|
|
Maximum and assignment.
00646 {
00647 if (operator>(v))
00648 return *this;
00649 operator=(v);
00650 return *this;
00651 }
|
|
|
Infimum.
00655 {
00656 return (operator<(v)) ? (*this) : v;
00657 }
|
|
|
Infimum and assignment.
|
|
|
Supremum.
00668 {
00669 return (operator>(v)) ? (*this) : v;
00670 }
|
|
|
Supremum and assignment.
|
|
|
Power.
00681 {
00682 return HxScalarDouble(::pow(_value, v._value));
00683 }
|
|
|
Modulo.
00687 {
00688 return (*this);
00689 }
|
|
|
And.
00693 {
00694 return (*this);
00695 }
|
|
|
Or.
00699 {
00700 return (*this);
00701 }
|
|
|
Xor.
00705 {
00706 return (*this);
00707 }
|
|
|
Left shift.
00711 {
00712 return (*this);
00713 }
|
|
|
Right shift.
00717 {
00718 return (*this);
00719 }
|
|
|
Dot product.
00069 {
00070 return _value * v._value;
00071 }
|
|
|
Cross product.
00723 {
00724 return HxScalarDouble(0.0);
00725 }
|
|
|
Print value on stream. For global operator<<
00075 {
00076 return os << _value;
00077 }
|
|
|
Value as a string.
00729 {
00730 return makeString(_value);
00731 }
|
|
||||||||||||
|
Addition.
00601 {
00602 return HxScalarDouble(v1._value + v2._value);
00603 }
|
|
||||||||||||
|
Subtraction.
00607 {
00608 return HxScalarDouble(v1._value - v2._value);
00609 }
|
|
||||||||||||
|
Multiplication.
00613 {
00614 return HxScalarDouble(v1._value * v2._value);
00615 }
|
|
||||||||||||
|
Division.
00619 {
00620 return HxScalarDouble(v1._value / v2._value);
00621 }
|
|
|
A small value w.r.t to the comparison operators "<" and ">". Not actually the minimum to avoid overflow. |
|
|
A large value w.r.t to the comparison operators "<" and ">". Not actually the maximum to avoid overflow. |
1.2.12 written by Dimitri van Heesch,
© 1997-2001