The functions defined by the specification. More...
Functions | |
| template<typename genFIType > | |
| genFIType | abs (genFIType const &x) |
| template<typename genType > | |
| genType | acos (genType const &x) |
| template<typename genType > | |
| genType | acosh (genType const &x) |
| template<template< typename > class vecType> | |
| GLM_FUNC_QUALIFIER bool | all (vecType< bool > const &v) |
| template<template< typename > class vecType> | |
| GLM_FUNC_QUALIFIER bool | any (vecType< bool > const &v) |
| template<typename genType > | |
| genType | asin (genType const &x) |
| template<typename genType > | |
| genType | asinh (genType const &x) |
| template<typename genType > | |
| genType | atan (genType const &y, genType const &x) |
| template<typename genType > | |
| genType | atan (genType const &y_over_x) |
| template<typename genType > | |
| genType | atanh (genType const &x) |
| template<typename T , template< typename > class C> | |
| C< T >::signed_type | bitCount (C< T > const &Value) |
| template<typename genIUType > | |
| genIUType | bitfieldExtract (genIUType const &Value, int const &Offset, int const &Bits) |
| template<typename genIUType > | |
| genIUType | bitfieldInsert (genIUType const &Base, genIUType const &Insert, int const &Offset, int const &Bits) |
| template<typename genIUType > | |
| genIUType | bitfieldReverse (genIUType const &value) |
| template<typename genType > | |
| genType | ceil (genType const &x) |
| template<typename genType > | |
| genType | clamp (genType const &x, genType const &minVal, genType const &maxVal) |
| template<typename genType > | |
| genType | cos (genType const &angle) |
| template<typename genType > | |
| genType | cosh (genType const &angle) |
| template<typename T > | |
| detail::tvec3< T > | cross (detail::tvec3< T > const &x, detail::tvec3< T > const &y) |
| template<typename genType > | |
| genType | degrees (genType const &radians) |
| template<typename T > | |
| detail::tmat2x2< T >::value_type | determinant (detail::tmat2x2< T > const &m) |
| template<typename T > | |
| detail::tmat3x3< T >::value_type | determinant (detail::tmat3x3< T > const &m) |
| template<typename T > | |
| detail::tmat4x4< T >::value_type | determinant (detail::tmat4x4< T > const &m) |
| template<typename genType > | |
| genType::value_type | distance (genType const &p0, genType const &p1) |
| template<typename genType > | |
| genType::value_type | dot (genType const &x, genType const &y) |
| template<typename T , template< typename > class vecType> | |
| GLM_FUNC_QUALIFIER vecType< T > ::bool_type | equal (vecType< T > const &x, vecType< T > const &y) |
| template<typename genType > | |
| genType | exp (genType const &x) |
| template<typename genType > | |
| genType | exp2 (genType const &x) |
| template<typename genType > | |
| genType | faceforward (genType const &N, genType const &I, genType const &Nref) |
| template<typename T , template< typename > class C> | |
| C< T >::signed_type | findLSB (C< T > const &Value) |
| template<typename T , template< typename > class C> | |
| C< T >::signed_type | findMSB (C< T > const &Value) |
| template<typename genType , typename genIType > | |
| genIType | floatBitsToInt (genType const &value) |
| template<typename genType , typename genUType > | |
| genUType | floatBitsToUint (genType const &value) |
| template<typename genType > | |
| genType | floor (genType const &x) |
| template<typename genType > | |
| genType | fma (genType const &a, genType const &b, genType const &c) |
| template<typename genType > | |
| genType | fract (genType const &x) |
| template<typename genType , typename genIType > | |
| genType | frexp (genType const &x, genIType &exp) |
| template<typename T , template< typename > class vecType> | |
| GLM_FUNC_QUALIFIER vecType< T > ::bool_type | greaterThan (vecType< T > const &x, vecType< T > const &y) |
| template<typename T , template< typename > class vecType> | |
| GLM_FUNC_QUALIFIER vecType< T > ::bool_type | greaterThanEqual (vecType< T > const &x, vecType< T > const &y) |
| template<typename genIType > | |
| void | imulExtended (genIType const &x, genIType const &y, genIType &msb, genIType &lsb) |
| template<typename genType , typename genIType > | |
| genType | intBitsToFloat (genIType const &value) |
| template<typename T > | |
| detail::tmat3x3< T > | inverse (detail::tmat3x3< T > const &m) |
| template<typename T > | |
| detail::tmat4x4< T > | inverse (detail::tmat4x4< T > const &m) |
| template<typename T > | |
| detail::tmat2x2< T > | inverse (detail::tmat2x2< T > const &m) |
| template<typename genType > | |
| genType | inversesqrt (genType const &x) |
| template<typename genType > | |
| genType::bool_type | isinf (genType const &x) |
| template<typename genType > | |
| genType::bool_type | isnan (genType const &x) |
| template<typename genType , typename genIType > | |
| genType | ldexp (genType const &x, genIType const &exp) |
| template<typename genType > | |
| genType::value_type | length (genType const &x) |
| template<typename T , template< typename > class vecType> | |
| GLM_FUNC_QUALIFIER vecType< T > ::bool_type | lessThan (vecType< T > const &x, vecType< T > const &y) |
| template<typename T , template< typename > class vecType> | |
| GLM_FUNC_QUALIFIER vecType< T > ::bool_type | lessThanEqual (vecType< T > const &x, vecType< T > const &y) |
| template<typename genType > | |
| genType | log (genType const &x) |
| template<typename genType > | |
| genType | log2 (genType const &x) |
| template<typename matType > | |
| matType | matrixCompMult (matType const &x, matType const &y) |
| template<typename genType > | |
| genType | max (genType const &x, genType const &y) |
| template<typename genType > | |
| genType | min (genType const &x, genType const &y) |
| template<typename genTypeT , typename genTypeU > | |
| genTypeT | mix (genTypeT const &x, genTypeT const &y, genTypeU const &a) |
| template<typename genType > | |
| genType | mod (genType const &x, genType const &y) |
| template<typename genType > | |
| genType | mod (genType const &x, typename genType::value_type const &y) |
| template<typename genType > | |
| genType | modf (genType const &x, genType &i) |
| template<typename genType > | |
| genType::value_type | noise1 (genType const &x) |
| template<typename genType > | |
| detail::tvec2< typename genType::value_type > | noise2 (genType const &x) |
| template<typename genType > | |
| detail::tvec3< typename genType::value_type > | noise3 (genType const &x) |
| template<typename genType > | |
| detail::tvec4< typename genType::value_type > | noise4 (genType const &x) |
| template<typename genType > | |
| genType | normalize (genType const &x) |
| template<template< typename > class vecType> | |
| GLM_FUNC_QUALIFIER vecType< bool > | not_ (vecType< bool > const &v) |
| template<typename T , template< typename > class vecType> | |
| GLM_FUNC_QUALIFIER vecType< T > ::bool_type | notEqual (vecType< T > const &x, vecType< T > const &y) |
| template<typename vecType , typename matType > | |
| matType | outerProduct (vecType const &c, vecType const &r) |
| double | packDouble2x32 (detail::tvec2< detail::uint32 > const &v) |
| detail::uint32 | packSnorm4x8 (detail::tvec4< detail::float32 > const &v) |
| detail::uint32 | packUnorm2x16 (detail::tvec2< detail::float32 > const &v) |
| detail::uint32 | packUnorm4x8 (detail::tvec4< detail::float32 > const &v) |
| template<typename genType > | |
| genType | pow (genType const &x, genType const &y) |
| template<typename genType > | |
| genType | radians (genType const °rees) |
| template<typename genType > | |
| genType | reflect (genType const &I, genType const &N) |
| template<typename genType > | |
| genType | refract (genType const &I, genType const &N, typename genType::value_type const &eta) |
| template<typename genType > | |
| genType | round (genType const &x) |
| template<typename genType > | |
| genType | roundEven (genType const &x) |
| template<typename genFIType > | |
| genFIType | sign (genFIType const &x) |
| template<typename genType > | |
| genType | sin (genType const &angle) |
| template<typename genType > | |
| genType | sinh (genType const &angle) |
| template<typename genType > | |
| genType | smoothstep (genType const &edge0, genType const &edge1, genType const &x) |
| template<typename genType > | |
| genType | sqrt (genType const &x) |
| template<typename genType > | |
| genType | step (genType const &edge, genType const &x) |
| template<typename genType > | |
| genType | tan (genType const &angle) |
| template<typename genType > | |
| genType | tanh (genType const &angle) |
| template<typename matType > | |
| matType::transpose_type | transpose (matType const &x) |
| template<typename genType > | |
| genType | trunc (genType const &x) |
| template<typename genUType > | |
| genUType | uaddCarry (genUType const &x, genUType const &y, genUType &carry) |
| template<typename genType , typename genUType > | |
| genType | uintBitsToFloat (genUType const &value) |
| template<typename genUType > | |
| void | umulExtended (genUType const &x, genUType const &y, genUType &msb, genUType &lsb) |
| detail::tvec2< detail::uint32 > | unpackDouble2x32 (double const &v) |
| detail::tvec4< detail::float32 > | unpackSnorm4x8 (detail::uint32 const &p) |
| detail::tvec2< detail::float32 > | unpackUnorm2x16 (detail::uint32 const &p) |
| detail::tvec4< detail::float32 > | unpackUnorm4x8 (detail::uint32 const &p) |
| template<typename genUType > | |
| genUType | usubBorrow (genUType const &x, genUType const &y, genUType &borrow) |
The functions defined by the specification.
| genFIType glm::abs | ( | genFIType const & | x | ) |
Returns x if x >= 0; otherwise, it returns -x.
| genType glm::acos | ( | genType const & | x | ) |
Arc cosine.
Returns an angle whose sine is x. The range of values returned by this function is [0, PI]. Results are undefined if |x| > 1.
| genType glm::acosh | ( | genType const & | x | ) |
Arc hyperbolic cosine; returns the non-negative inverse of cosh.
Results are undefined if x < 1.
| GLM_FUNC_QUALIFIER bool glm::all | ( | vecType< bool > const & | v | ) |
Returns true if all components of x are true.
Definition at line 189 of file func_vector_relational.hpp.
| GLM_FUNC_QUALIFIER bool glm::any | ( | vecType< bool > const & | v | ) |
Returns true if any component of x is true.
Definition at line 173 of file func_vector_relational.hpp.
| genType glm::asin | ( | genType const & | x | ) |
Arc sine.
Returns an angle whose sine is x. The range of values returned by this function is [-PI/2, PI/2]. Results are undefined if |x| > 1.
| genType glm::asinh | ( | genType const & | x | ) |
Arc hyperbolic sine; returns the inverse of sinh.
| genType glm::atan | ( | genType const & | y, |
| genType const & | x | ||
| ) |
Arc tangent.
Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0.
Referenced by glm::atan2().
| genType glm::atan | ( | genType const & | y_over_x | ) |
Arc tangent.
Returns an angle whose tangent is y_over_x. The range of values returned by this function is [-PI/2, PI/2].
| genType glm::atanh | ( | genType const & | x | ) |
Arc hyperbolic tangent; returns the inverse of tanh.
Results are undefined if abs(x) >= 1.
| C<T>::signed_type glm::bitCount | ( | C< T > const & | Value | ) |
Returns the number of bits set to 1 in the binary representation of value.
| genIUType glm::bitfieldExtract | ( | genIUType const & | Value, |
| int const & | Offset, | ||
| int const & | Bits | ||
| ) |
Extracts bits [offset, offset + bits - 1] from value, returning them in the least significant bits of the result.
For unsigned data types, the most significant bits of the result will be set to zero. For signed data types, the most significant bits will be set to the value of bit offset + base – 1.
If bits is zero, the result will be zero. The result will be undefined if offset or bits is negative, or if the sum of offset and bits is greater than the number of bits used to store the operand.
| genIUType glm::bitfieldInsert | ( | genIUType const & | Base, |
| genIUType const & | Insert, | ||
| int const & | Offset, | ||
| int const & | Bits | ||
| ) |
Returns the insertion the bits least-significant bits of insert into base.
The result will have bits [offset, offset + bits - 1] taken from bits [0, bits – 1] of insert, and all other bits taken directly from the corresponding bits of base. If bits is zero, the result will simply be base. The result will be undefined if offset or bits is negative, or if the sum of offset and bits is greater than the number of bits used to store the operand.
| genIUType glm::bitfieldReverse | ( | genIUType const & | value | ) |
Returns the reversal of the bits of value.
The bit numbered n of the result will be taken from bit (bits - 1) - n of value, where bits is the total number of bits used to represent value.
| genType glm::ceil | ( | genType const & | x | ) |
Returns a value equal to the nearest integer that is greater than or equal to x.
| genType glm::clamp | ( | genType const & | x, |
| genType const & | minVal, | ||
| genType const & | maxVal | ||
| ) |
Returns min(max(x, minVal), maxVal) for each component in x.
using the floating-point values minVal and maxVal.
Referenced by glm::saturate().
| genType glm::cos | ( | genType const & | angle | ) |
The standard trigonometric cosine function.
The values returned by this function will range from [-1, 1].
| genType glm::cosh | ( | genType const & | angle | ) |
Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2.
| detail::tvec3<T> glm::cross | ( | detail::tvec3< T > const & | x, |
| detail::tvec3< T > const & | y | ||
| ) |
Returns the cross product of x and y.
| genType glm::degrees | ( | genType const & | radians | ) |
Converts radians to degrees and returns the result.
| detail::tmat2x2<T>::value_type glm::determinant | ( | detail::tmat2x2< T > const & | m | ) |
Return the determinant of a mat2 matrix.
| detail::tmat3x3<T>::value_type glm::determinant | ( | detail::tmat3x3< T > const & | m | ) |
Return the determinant of a mat3 matrix.
| detail::tmat4x4<T>::value_type glm::determinant | ( | detail::tmat4x4< T > const & | m | ) |
Return the determinant of a mat4 matrix.
| genType::value_type glm::distance | ( | genType const & | p0, |
| genType const & | p1 | ||
| ) |
Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).
| genType::value_type glm::dot | ( | genType const & | x, |
| genType const & | y | ||
| ) |
Returns the dot product of x and y, i.e., result = x * y.
| GLM_FUNC_QUALIFIER vecType<T>::bool_type glm::equal | ( | vecType< T > const & | x, |
| vecType< T > const & | y | ||
| ) |
Returns the component-wise comparison of result x == y.
Definition at line 134 of file func_vector_relational.hpp.
| genType glm::exp | ( | genType const & | x | ) |
Returns the natural exponentiation of x, i.e., e^x.
| genType glm::exp2 | ( | genType const & | x | ) |
Returns 2 raised to the x power.
| genType glm::faceforward | ( | genType const & | N, |
| genType const & | I, | ||
| genType const & | Nref | ||
| ) |
If dot(Nref, I) < 0.0, return N, otherwise, return -N.
| C<T>::signed_type glm::findLSB | ( | C< T > const & | Value | ) |
Returns the bit number of the least significant bit set to 1 in the binary representation of value.
If value is zero, -1 will be returned.
| C<T>::signed_type glm::findMSB | ( | C< T > const & | Value | ) |
Returns the bit number of the most significant bit in the binary representation of value.
For positive integers, the result will be the bit number of the most significant bit set to 1. For negative integers, the result will be the bit number of the most significant bit set to 0. For a value of zero or negative one, -1 will be returned.
| genIType glm::floatBitsToInt | ( | genType const & | value | ) |
Returns a signed integer value representing the encoding of a floating-point value.
The floatingpoint value's bit-level representation is preserved.
| genUType glm::floatBitsToUint | ( | genType const & | value | ) |
Returns a unsigned integer value representing the encoding of a floating-point value.
The floatingpoint value's bit-level representation is preserved.
| genType glm::floor | ( | genType const & | x | ) |
Returns a value equal to the nearest integer that is less then or equal to x.
| genType glm::fma | ( | genType const & | a, |
| genType const & | b, | ||
| genType const & | c | ||
| ) |
Computes and returns a * b + c.
| genType glm::fract | ( | genType const & | x | ) |
Return x - floor(x).
| genType glm::frexp | ( | genType const & | x, |
| genIType & | exp | ||
| ) |
Splits x into a floating-point significand in the range [0.5, 1.0) and an integral exponent of two, such that: x = significand * exp(2, exponent)
The significand is returned by the function and the exponent is returned in the parameter exp. For a floating-point value of zero, the significant and exponent are both zero. For a floating-point value that is an infinity or is not a number, the results are undefined.
| GLM_FUNC_QUALIFIER vecType<T>::bool_type glm::greaterThan | ( | vecType< T > const & | x, |
| vecType< T > const & | y | ||
| ) |
Returns the component-wise comparison of result x > y.
Definition at line 90 of file func_vector_relational.hpp.
| GLM_FUNC_QUALIFIER vecType<T>::bool_type glm::greaterThanEqual | ( | vecType< T > const & | x, |
| vecType< T > const & | y | ||
| ) |
Returns the component-wise comparison of result x >= y.
Definition at line 112 of file func_vector_relational.hpp.
| void glm::imulExtended | ( | genIType const & | x, |
| genIType const & | y, | ||
| genIType & | msb, | ||
| genIType & | lsb | ||
| ) |
Multiplies 32-bit integers x and y, producing a 64-bit result.
The 32 least-significant bits are returned in lsb. The 32 most-significant bits are returned in msb.
| genType glm::intBitsToFloat | ( | genIType const & | value | ) |
Returns a floating-point value corresponding to a signed integer encoding of a floating-point value.
If an inf or NaN is passed in, it will not signal, and the resulting floating point value is unspecified. Otherwise, the bit-level representation is preserved.
| detail::tmat3x3<T> glm::inverse | ( | detail::tmat3x3< T > const & | m | ) |
Return the inverse of a mat3 matrix.
| detail::tmat4x4<T> glm::inverse | ( | detail::tmat4x4< T > const & | m | ) |
Return the inverse of a mat4 matrix.
| detail::tmat2x2<T> glm::inverse | ( | detail::tmat2x2< T > const & | m | ) |
Return the inverse of a mat2 matrix.
| genType glm::inversesqrt | ( | genType const & | x | ) |
Returns the reciprocal of the positive square root of x.
| bool isinf | ( | genType const & | x | ) |
Returns true if x holds a positive infinity or negative infinity representation in the underlying implementation's set of floating point representations.
Determines whether the given floating-point value is infinite. (From GLM_GTX_compatibility extension)
Returns false otherwise, including for implementations with no infinity representations.
| bool isnan | ( | genType const & | x | ) |
Returns true if x holds a NaN (not a number) representation in the underlying implementation's set of floating point representations.
Checks given floating-point value for not a number (NAN) (From GLM_GTX_compatibility extension)
Returns false otherwise, including for implementations with no NaN representations.
| genType glm::ldexp | ( | genType const & | x, |
| genIType const & | exp | ||
| ) |
Builds a floating-point number from x and the corresponding integral exponent of two in exp, returning: significand * exp(2, exponent)
If this product is too large to be represented in the floating-point type, the result is undefined.
| genType::value_type glm::length | ( | genType const & | x | ) |
Returns the length of x, i.e., sqrt(x * x).
| GLM_FUNC_QUALIFIER vecType<T>::bool_type glm::lessThan | ( | vecType< T > const & | x, |
| vecType< T > const & | y | ||
| ) |
Returns the component-wise comparison result of x < y.
Definition at line 45 of file func_vector_relational.hpp.
| GLM_FUNC_QUALIFIER vecType<T>::bool_type glm::lessThanEqual | ( | vecType< T > const & | x, |
| vecType< T > const & | y | ||
| ) |
Returns the component-wise comparison of result x <= y.
Definition at line 68 of file func_vector_relational.hpp.
| genType glm::log | ( | genType const & | x | ) |
Returns the natural logarithm of x, i.e., returns the value y which satisfies the equation x = e^y.
Results are undefined if x <= 0.
| genType glm::log2 | ( | genType const & | x | ) |
Returns the base 2 log of x, i.e., returns the value y, which satisfies the equation x = 2 ^ y.
| matType glm::matrixCompMult | ( | matType const & | x, |
| matType const & | y | ||
| ) |
Multiply matrix x by matrix y component-wise, i.e., result[i][j] is the scalar product of x[i][j] and y[i][j].
| genType glm::max | ( | genType const & | x, |
| genType const & | y | ||
| ) |
Returns y if x < y; otherwise, it returns x.
| genType glm::min | ( | genType const & | x, |
| genType const & | y | ||
| ) |
Returns y if y < x; otherwise, it returns x.
| genTypeT glm::mix | ( | genTypeT const & | x, |
| genTypeT const & | y, | ||
| genTypeU const & | a | ||
| ) |
| [in] | x | Floating point scalar or vector. |
| [in] | y | Floating point scalar or vector. |
| [in] | a | Floating point or boolean scalar or vector. |
Referenced by glm::lerp().
| genType glm::mod | ( | genType const & | x, |
| genType const & | y | ||
| ) |
Modulus.
Returns x - y * floor(x / y) for each component in x using the floating point value y.
| genType glm::mod | ( | genType const & | x, |
| typename genType::value_type const & | y | ||
| ) |
Modulus.
Returns x - y * floor(x / y) for each component in x using the floating point value y.
| genType glm::modf | ( | genType const & | x, |
| genType & | i | ||
| ) |
Returns the fractional part of x and sets i to the integer part (as a whole number floating point value).
Both the return value and the output parameter will have the same sign as x.
| genType::value_type glm::noise1 | ( | genType const & | x | ) |
Returns a 1D noise value based on the input value x.
| detail::tvec2<typename genType::value_type> glm::noise2 | ( | genType const & | x | ) |
Returns a 2D noise value based on the input value x.
| detail::tvec3<typename genType::value_type> glm::noise3 | ( | genType const & | x | ) |
Returns a 3D noise value based on the input value x.
| detail::tvec4<typename genType::value_type> glm::noise4 | ( | genType const & | x | ) |
Returns a 4D noise value based on the input value x.
| genType glm::normalize | ( | genType const & | x | ) |
Returns a vector in the same direction as x but with length of 1.
| GLM_FUNC_QUALIFIER vecType<bool> glm::not_ | ( | vecType< bool > const & | v | ) |
Returns the component-wise logical complement of x.
/!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.
Definition at line 206 of file func_vector_relational.hpp.
| GLM_FUNC_QUALIFIER vecType<T>::bool_type glm::notEqual | ( | vecType< T > const & | x, |
| vecType< T > const & | y | ||
| ) |
Returns the component-wise comparison of result x != y.
Definition at line 154 of file func_vector_relational.hpp.
| matType glm::outerProduct | ( | vecType const & | c, |
| vecType const & | r | ||
| ) |
Treats the first parameter c as a column vector and the second parameter r as a row vector and does a linear algebraic matrix multiply c * r.
| double glm::packDouble2x32 | ( | detail::tvec2< detail::uint32 > const & | v | ) |
Returns a double-precision value obtained by packing the components of v into a 64-bit value.
If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified. Otherwise, the bit- level representation of v is preserved. The first vector component specifies the 32 least significant bits; the second component specifies the 32 most significant bits.
| detail::uint32 glm::packSnorm4x8 | ( | detail::tvec4< detail::float32 > const & | v | ) |
First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values.
Then, the results are packed into the returned 32-bit unsigned integer.
The conversion for component c of v to fixed point is done as follows: packSnorm4x8: round(clamp(c, -1, +1) * 127.0)
The first component of the vector will be written to the least significant bits of the output; the last component will be written to the most significant bits.
| detail::uint32 glm::packUnorm2x16 | ( | detail::tvec2< detail::float32 > const & | v | ) |
First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values.
Then, the results are packed into the returned 32-bit unsigned integer.
The conversion for component c of v to fixed point is done as follows: packUnorm2x16: round(clamp(c, 0, +1) * 65535.0)
The first component of the vector will be written to the least significant bits of the output; the last component will be written to the most significant bits.
| detail::uint32 glm::packUnorm4x8 | ( | detail::tvec4< detail::float32 > const & | v | ) |
First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values.
Then, the results are packed into the returned 32-bit unsigned integer.
The conversion for component c of v to fixed point is done as follows: packUnorm4x8: round(clamp(c, 0, +1) * 255.0)
The first component of the vector will be written to the least significant bits of the output; the last component will be written to the most significant bits.
| genType glm::pow | ( | genType const & | x, |
| genType const & | y | ||
| ) |
Returns x raised to the y power.
| genType glm::radians | ( | genType const & | degrees | ) |
Converts degrees to radians and returns the result.
| genType glm::reflect | ( | genType const & | I, |
| genType const & | N | ||
| ) |
For the incident vector I and surface orientation N, returns the reflection direction : result = I - 2.0 * dot(N, I) * N.
| genType glm::refract | ( | genType const & | I, |
| genType const & | N, | ||
| typename genType::value_type const & | eta | ||
| ) |
For the incident vector I and surface normal N, and the ratio of indices of refraction eta, return the refraction vector.
| genType glm::round | ( | genType const & | x | ) |
Returns a value equal to the nearest integer to x.
The fraction 0.5 will round in a direction chosen by the implementation, presumably the direction that is fastest. This includes the possibility that round(x) returns the same value as roundEven(x) for all values of x.
| genType glm::roundEven | ( | genType const & | x | ) |
Returns a value equal to the nearest integer to x.
A fractional part of 0.5 will round toward the nearest even integer. (Both 3.5 and 4.5 for x will return 4.0.)
| genFIType glm::sign | ( | genFIType const & | x | ) |
Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0.
| genType glm::sin | ( | genType const & | angle | ) |
The standard trigonometric sine function.
The values returned by this function will range from [-1, 1].
| genType glm::sinh | ( | genType const & | angle | ) |
Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2.
| genType glm::smoothstep | ( | genType const & | edge0, |
| genType const & | edge1, | ||
| genType const & | x | ||
| ) |
Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and performs smooth Hermite interpolation between 0 and 1 when edge0 < x < edge1.
This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to: genType t; t = clamp ((x – edge0) / (edge1 – edge0), 0, 1); return t * t * (3 – 2 * t); Results are undefined if edge0 >= edge1.
| genType glm::sqrt | ( | genType const & | x | ) |
Returns the positive square root of x.
| genType glm::step | ( | genType const & | edge, |
| genType const & | x | ||
| ) |
Returns 0.0 if x < edge, otherwise it returns 1.0.
| genType glm::tan | ( | genType const & | angle | ) |
The standard trigonometric tangent function.
| genType glm::tanh | ( | genType const & | angle | ) |
Returns the hyperbolic tangent function, sinh(angle) / cosh(angle)
| matType::transpose_type glm::transpose | ( | matType const & | x | ) |
Returns the transposed matrix of x.
| genType glm::trunc | ( | genType const & | x | ) |
Returns a value equal to the nearest integer to x whose absolute value is not larger than the absolute value of x.
| genUType glm::uaddCarry | ( | genUType const & | x, |
| genUType const & | y, | ||
| genUType & | carry | ||
| ) |
Adds 32-bit unsigned integer x and y, returning the sum modulo pow(2, 32).
The value carry is set to 0 if the sum was less than pow(2, 32), or to 1 otherwise.
| genType glm::uintBitsToFloat | ( | genUType const & | value | ) |
Returns a floating-point value corresponding to a unsigned integer encoding of a floating-point value.
If an inf or NaN is passed in, it will not signal, and the resulting floating point value is unspecified. Otherwise, the bit-level representation is preserved.
| void glm::umulExtended | ( | genUType const & | x, |
| genUType const & | y, | ||
| genUType & | msb, | ||
| genUType & | lsb | ||
| ) |
Multiplies 32-bit integers x and y, producing a 64-bit result.
The 32 least-significant bits are returned in lsb. The 32 most-significant bits are returned in msb.
| detail::tvec2<detail::uint32> glm::unpackDouble2x32 | ( | double const & | v | ) |
Returns a two-component unsigned integer vector representation of v.
The bit-level representation of v is preserved. The first component of the vector contains the 32 least significant bits of the double; the second component consists the 32 most significant bits.
| detail::tvec4<detail::float32> glm::unpackSnorm4x8 | ( | detail::uint32 const & | p | ) |
First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
The conversion for unpacked fixed-point value f to floating point is done as follows: unpackSnorm4x8: clamp(f / 127.0, -1, +1)
The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.
| detail::tvec2<detail::float32> glm::unpackUnorm2x16 | ( | detail::uint32 const & | p | ) |
First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
The conversion for unpacked fixed-point value f to floating point is done as follows: unpackUnorm2x16: f / 65535.0
The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.
| detail::tvec4<detail::float32> glm::unpackUnorm4x8 | ( | detail::uint32 const & | p | ) |
First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
The conversion for unpacked fixed-point value f to floating point is done as follows: unpackUnorm4x8: f / 255.0
The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from the most significant bits.
| genUType glm::usubBorrow | ( | genUType const & | x, |
| genUType const & | y, | ||
| genUType & | borrow | ||
| ) |
Subtracts the 32-bit unsigned integer y from x, returning the difference if non-negative, or pow(2, 32) plus the difference otherwise.
The value borrow is set to 0 if x >= y, or to 1 otherwise.


Observes Redis keyspace events and notifies clients of updates
- Source:
Methods
(static) start() → {Promise}
Start the subscription and observance of keyspace events.
- Source:
Returns:
A promise resolved when the subscription starts
- Type
- Promise
(private, inner) expireClient(client)
Handle an expired client.
Parameters:
| Name | Type | Description |
|---|---|---|
client |
Client | The expired client |
- Source:
(private, inner) handleMessage(_pattern, channel, message)
Handle a message received by the event subscriber.
Parameters:
| Name | Type | Description |
|---|---|---|
_pattern |
string | The pattern the message matches |
channel |
string | The channel the message came over |
message |
string | The message that was received |
- Source:
(private, inner) publishEvent(eventName, subject)
Publish an event to all clients connected to a space.
Parameters:
| Name | Type | Description |
|---|---|---|
eventName |
string | The name of the event |
subject |
Client | The subject client |
- Source:


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
E
- public interface Deque<E>
Deque interface definition from Java 6 See java.util.Deque Java 6 API documentation for more information.
| Method Summary | |
|---|---|
void |
addFirst(E e)
Inserts element e into the front of the deque. |
void |
addLast(E ea)
Inserts element ea at the end of the deque. |
java.util.Iterator<E> |
descendingIterator()
Returns an iterator over this deque which traverses the elements from last to first. |
E |
getFirst()
Returns head (first element) of this deque, but does not remove it. |
E |
getLast()
Returns tail (last element) of this deque, but does not remove it. |
boolean |
offerFirst(E e)
Inserts element e at the front of this deque. |
boolean |
offerLast(E e)
Inserts element e at the tail of this deque. |
E |
peekFirst()
Returns the first element of this deque, or null if deque is empty. |
E |
peekLast()
Returns the last element of this deque, or null if deque is empty. |
E |
pollFirst()
Returns and removes first (head) element of this deque, or null if this deque is empty. |
E |
pollLast()
Returns and removes last (tail) element of this deque, or null if this deque is empty. |
E |
removeFirst()
Returns and removes the first element in this deque. |
boolean |
removeFirstOccurrence(java.lang.Object o)
Remove first occurrence of specified object o in this deque. |
E |
removeLast()
Returns and removes the last element in this deque. |
boolean |
removeLastOccurrence(java.lang.Object o)
Remove last occurrence of specified object o in this deque. |
| Methods inherited from interface java.util.Queue |
|---|
add, element, offer, peek, poll, remove |
| Methods inherited from interface java.util.Collection |
|---|
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
| Method Detail |
|---|
void addFirst(E e)
e
- element being addedvoid addLast(E ea)
ea
- element being added to the end of the deque.java.util.Iterator<E> descendingIterator()
E getFirst()
NoSuchElementException
E getLast()
NoSuchElementException
boolean offerFirst(E e)
addFirst(E)
.
e
- element to insert.
boolean offerLast(E e)
addLast(E)
.
e
- element to insert
E peekFirst()
E peekLast()
E pollFirst()
E pollLast()
E removeFirst()
E removeLast()
boolean removeFirstOccurrence(java.lang.Object o)
o
- element to be removed, if present.
boolean removeLastOccurrence(java.lang.Object o)
o
- element to be removed, if present.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Public Member Functions | |
| virtual | ~CharsetEncoder () |
| Destructor. | |
| virtual log4cxx_status_t | encode (const LogString &in, LogString::const_iterator &iter, ByteBuffer &out)=0 |
| Encodes as many characters from the input string as possible to the output buffer. | |
| virtual void | reset () |
| Resets any internal state. | |
| virtual void | flush (ByteBuffer &out) |
| Flushes the encoder. | |
Static Public Member Functions | |
| static CharsetEncoderPtr | getDefaultEncoder () |
| Get encoder for default charset. | |
| static CharsetEncoderPtr | getEncoder (const LogString &charset) |
| Get encoder for specified character set. | |
| static CharsetEncoderPtr | getUTF8Encoder () |
| Get encoder for UTF-8. | |
| static void | encode (CharsetEncoderPtr &enc, const LogString &src, LogString::const_iterator &iter, ByteBuffer &dst) |
| Encodes a string replacing unmappable characters with escape sequences. | |
| static bool | isError (log4cxx_status_t stat) |
| Determines if the return value from encode indicates an unconvertable character. | |
Protected Member Functions | |
| CharsetEncoder () | |
| Protected constructor. |
|
|
Protected constructor.
|
|
|
Destructor.
|
|
|
Encodes as many characters from the input string as possible to the output buffer.
|
|
|
Encodes a string replacing unmappable characters with escape sequences.
|
|
|
Flushes the encoder.
|
|
|
Get encoder for default charset.
|
|
|
Get encoder for specified character set.
|
|
|
Get encoder for UTF-8.
|
|
|
Determines if the return value from encode indicates an unconvertable character.
|
|
|
Resets any internal state.
|


Demos
| Demo Name |
Description |
Status |
Link |
| Click to show time |
test JavaScipt for getting current date and time. |
Completed |
|
| Jump to Bottom of demo |
click link for jumping to the location of anther page with
ID specified |
Completed |
|
| Search Demo |
click link for jumping to the location of anther page with
ID specified |
Completed |
|


Grading can take days to grade an assignment and grading paper is worse.
Students may submit their own distinct templates which are hard to follow.
Instructor must fill the grades into their Excel file or D2l after grading
and also with matching each student’s name.
What if we have a great tool for these most time consuming processes can be
done from a document by one click instead of writing grade on the paper,
updating score on the web and submitting file to the dropbox,
instructor save their time for grading and put more time to focus on the class
for better quality.
Do you love to use D2L?
It is HARD to manage lots of contents from a D2l, especially assignment. User must download a file and save a file to access it.
What if you forget to bring your USB
What if you forget to update a file to your cloud drive such as Google drive, drob box or OneDrive
What if you lost your USB before submitting your assignment
Less work & More time
Open Board makes instructors and students easier to manage education contents
Open Board can Solve all your Problems
Open Board is e-Learning Contents Management System.
It allows to handling every process of assigning, submitting, grading
and updating score automatically just by one Click


Nate Finch
functions.php
?DEMO
wp-content/uploads
directory)
"Form and Function"
wp-content
style.css
style.css
- You can if you don't want to make a child theme.
Should I use a Custom CSS/JS plugin?- You can if you don't want to make a child theme or custom plugin.
Should I use a Custom PHP plugin?- You can, but you probably shouldn't.🤪


B.C. Hydro says customers are largely unprepared for worsening winter storms
B.C. Hydro says its customers are largely unprepared for power outages despite increasingly severe winter storms.
The Crown utility says in a report that it’s seeing increasing damage to its infrastructure because of storms in recent years.
A powerful windstorm last December left 750,000 customers without power and tens of thousands waited days and weeks for power to be restored in the largest outage in the utility’s history.
B.C. Hydro says a survey of 800 customers found more than 60 per cent have not taken steps to prepare for storm-related power outages and only half have an emergency kit.
The survey found that most people affected by the December 2018 storm felt they could have been more prepared, yet only half have taken any steps toward that since then.
B.C. Hydro is encouraging customers to stock emergency kits with enough supplies to sustain each member of a household for at least three days. A kit should include a flashlight with extra batteries, a first-aid kit, any required medication, non-perishable food and bottled water.
The utility is reminding people to call 911 if they come across a downed or damaged power line, which should be considered live and dangerous.
B.C. Hydro is also preparing itself for winter storms, with new technology and processes to confirm outages, improve communication in the field and predict storms. The utility says it spends about $50 million a year on its vegetation-management program to help prevent tree-related outages. In 2018, crews removed more than 52,000 trees.
It also performs regular maintenance and upgrades to the system to help ensure reliability and prevent outages, replacing about 10,000 damaged or weakened power poles each year.
Vancouver Island and the Gulf Islands were hardest hit by last December’s storm, with about 87% of B.C. Hydro customers in the region losing power.
The storm saw winds coming from multiple directions — generally in the range of 70 to 100 kilometres an hour, with gusts topping 100 km/h in some areas.
Hundreds of trees fell, making roads impassable in some places. As a result of the storm, there were twice as many tree-related outages on the Island in 2018 compared with the five-year average.
In December 2017, an ice storm that hit the Fraser Valley caused challenges for crews when freezing rain and below-zero temperatures caused ice to form on trees, which broke and fell onto power lines or knocked down power poles.
B.C. Hydro said its equipment became encased in ice and the poor weather conditions made it extremely difficult for crews to respond.
In August 2015, a summer windstorm knocked out power to more than 700,000 customers over a three-day period on the Lower Mainland and Vancouver Island.
— With a file from the Times Colonist
HERE’S WHAT YOU NEED
What to put in your emergency kit:
• A flashlight and extra batteries
• First aid kit
• Required medications
• Non-perishable food
• Enough bottled water to last at least 72 hours
• Warm clothing and blankets


BAM and annotation file at specific locus
JSON session file
XML (IGV desktop) session file
BedPE file with name
DBSnp with index
Fasta


DBC week 7: Technical blog
Loop with Ruby vs. JS
Established on Jan. 23, 2016
Looping is one of the basic but yet one of the most important idea about programming. We expect computers to help us complete tedious tasks then free us from it to do other work for the sake of efficiency. That's why we need looping to automate similar actions. This week, since we are in the middle of the transition from Ruby to JavaScript, I want to take this chance to talk about iteration in Ruby vs. iteration in JavaScript.
Here is a simple example of iteration in both Ruby and JavaScript. Say, we want to count 99 times starting from 0. Both will print out 0 to 99 on the console.
As you may have noticed, Ruby seems to be more syntactical, intuitive. While JavaScript requires more words to complete the same task. Below is a table to explain the above two looping action.
In each example, you will find both iteration consist of three parts.
- 1. State of iteration
- 2. Condition to determine whether the loop should continue or terminated.
- 3. Iterator to keep track with the current state and update it after previous iteration.
Here is another example to loop over hash (in Ruby) and object (in JS).
Since Ruby is well-known of its readability, it has many built-in methods that handle challenging situations. In Ruby, we have Array#each, Array#each_index, Array#map, Array#select for looping an Array. To loop through a Hash, we have Hash#each, Hash#each_pair, Hash#map. On the other hand, in JavaScript, we have less intuitive methods. Rather, we use for-in loop to loop through Object (JS version of Ruby's Hash).
Although Ruby and JavaScript are both commonly use in the industry, they have their own specialty. JavaScript is a client-side language and Ruby is server-side. So typically you would use each language for its respective purpose.


On this page, configure Emmet preferences for HTML, XML, JavaScript (JSX Harmony) files and Style Sheets.
(IntelliJ IDEA expands abbreviations only if their output does not exceed 15 KB.)


Tania Vieira C.
MARKETING DIGITAL
E-COMMERCE MANAGEMENT
FRONT-END DEVELOPMENT
tag-test
Do you know Find out more


So you might be wondering...given the many places there are on the Web already to look for and advertise jobs, why should you care about jobs.code4lib.org? Well, it's different for a few reasons.
code4lib is a niche within a niche: an international community of software developers, designers and architects who happen to work in the cultural heritage sector (libraries, archives, museums, galleries, etc). There are a lot of esoteric tools, projects and people to know. The idea is that jobs.code4lib.org can help people get an idea of what kinds of skills and experience are useful to acquire.
Arguably jobs.code4lib.org is even more of an oddity because it doesn't use one of the many opensource job software packages, but is itself a piece of custom software called shortimer. For several years the code4lib discussion list has been heavily used as a place to advertise (and find) jobs. shortimer basically subscribes to the discussion list and looks for job postings to publish here. Think of it as a Web amplifier for the jobs on the discussion list.


Couldn't add this buddy, please try another adress.
You already have this connexion with this buddy
Couldn't pay this buddy, you don't have the sufficient amounts.
Couldn't send the money to your buddy because his account is full
Your buddy registered to the app, but didn't linked it to a bank account. You cannot send him money.
You cannot add yourself to the list.
Send Money
My Transactions
| Connections | Description | Amount |
|---|---|---|


We specialize in Web Design and pride ourselves in producing polished websites that highlight your goods and services. If a full website isn't what you need we can also help with advertising assets, logos designs or various other services - just ask us! If a project falls outside of our expertice we will gladly point you in the right direction to best serve you.
We are a small, customer-centric team that values getting to know each individual who engages our services. We want to know about your goals and aspirations in order to help create the best solution for all.
About UsIf you would like an example of our work you can check out a few of our previous projects by clicking the button below.
If you would like to learn more please reach out and chat with us. We would be happy to speak and help decide if our services will meet your needs.
Contact


ACE complex nCoV-RBD structure RBD -nCoV Fig. SARS-RBD interface domain cryo-EM ACE. helix ternary ACE-B RBD. analysis coronavirus full-length receptor spike Cryo-EM Overall Wang complex. human new protein resolution (PD) Figure RBD-ACE-B SARS-CoV Structural interaction interactions overall protease residues respectively. (labeled AT, Asn B). Chen Download Gln, Lys Open Phe Zhang [[#xB]] affinity basis bioRxiv. colored coloured comparison data-hide-link-title=""> data-icon-position="" figure mainly map presence recognition shown structural superimposed surface tab variations viral


Your screen is above Scroogify's configured threshold. Refresh the page now and the images below will load normally.
Scroogify never serves an image wider than the maximum pixel width of the device.
Stretched images are sourced to their exact rendered dimension, saving even more precious bandwidth.
Same as before — only the rendered size is fetched. Note that the first image has a HTML width attribute, overridden with CSS.
Just to show that this works with images that don't come (directly) from placekitten.com.


{% load get_step_url from exceptional_review_procedure %}
Feedback form details
{% include 'core/summary/section-how-affected.html' with label='As a UK business trade organisation' %}
{% include 'core/summary/section-user-type.html' with label='I import the affected goods from overseasc' %}
{% include 'core/summary/section-affected-goods.html' %}
What were your global sales volumes for products related to these goods before Brexit?
{% include 'core/summary/section-sales-volume-before-brexit.html' %}
What were your global sales revenues (in GDP) for products related to these goods before Brexit?
{% include 'core/summary/section-sales-revenue-before-brexit.html' %}
Are you aware of changes to your imports for these goods since Brexit?
{% include 'core/summary/section-demand-after-brexit.html' %}
Are you aware of changes to your sales for products for products related to these goods since Brexit?
{% include 'core/summary/section-market-change.html' %}
Have there been any other changes to your business since Brexit?
{% include 'core/summary/section-other-changes-after-brexit.html' %}
{% include 'core/summary/section-market-size.html' %}
{% include 'core/summary/section-other-information.html' %}
What percentage of your total production cost do these goods represent?


|
MoveToCode
|
Updates a rigidbody transform against another transform. More...
Public Member Functions | |
| void | UpdateState (bool active) |
| Updates the position of the JointKinematicBody based on JointType. More... | |
Properties | |
| Transform | Joint [get, set] |
| The joint this component tracks. More... | |
| Handedness | HandednessType [get, set] |
| What hand this component lives on. More... | |
| TrackedHandJoint | JointType [get, set] |
| What joint this component lives on. More... | |
| Action< JointKinematicBody > | OnEnableAction [get, set] |
| An event to subscribe to when the component get's enabled. More... | |
| Action< JointKinematicBody > | OnDisableAction [get, set] |
| An event to subscribe to when the component get's disabled. More... | |
Updates a rigidbody transform against another transform.
| void Microsoft.MixedReality.Toolkit.Extensions.HandPhysics.JointKinematicBody.UpdateState | ( | bool | active | ) |
Updates the position of the JointKinematicBody based on JointType.
|
getset |
What hand this component lives on.
|
getset |
The joint this component tracks.
|
getset |
What joint this component lives on.
|
getset |
An event to subscribe to when the component get's disabled.
Useful for tacking when the joint loses tracking.
|
getset |
An event to subscribe to when the component get's enabled.
Useful for tacking when the joint loses tracking.


Source code for neodroidvision.utilities.misc.perlin
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "heider"
__doc__ = r"""
Created on 5/5/22
"""
import math
import random
from itertools import product
import numpy
from warg import Number
__all__ = ["PerlinNoiseGenerator"]
def smoothstep(t: Number) -> Number:
"""Smooth curve with a zero derivative at 0 and 1, making it useful for
interpolating.
"""
return t * t * (3.0 - 2.0 * t)
def lerp(t: Number, a: Number, b: Number) -> Number:
"""Linear interpolation between a and b, given a fraction t."""
return a + t * (b - a)
[docs]class PerlinNoiseGenerator(object):
"""Callable that produces Perlin noise for an arbitrary point in an
arbitrary number of dimensions. The underlying grid is aligned with the
integers.
There is no limit to the coordinates used; new gradients are generated on
the fly as necessary.
"""
[docs] def __init__(self, dimension, octaves=1, tile=(), unbias=False):
"""Create a new Perlin noise factory in the given number of dimensions,
which should be an integer and at least 1.
More octaves create a foggier and more-detailed noise pattern. More
than 4 octaves is rather excessive.
``tile`` can be used to make a seamlessly tiling pattern. For example:
pnf = PerlinNoiseGenerator(2, tile=(0, 3))
This will produce noise that tiles every 3 units vertically, but never
tiles horizontally.
If ``unbias`` is true, the smoothstep function will be applied to the
output before returning it, to counteract some of Perlin noise's
significant bias towards the center of its output range.
"""
self.dimension = dimension
self.octaves = octaves
self.tile = tile + (0,) * dimension
self.unbias = unbias
# For n dimensions, the range of Perlin noise is ±sqrt(n)/2; multiply
# by this to scale to ±1
self.scale_factor = 2 * dimension**-0.5
self.gradient = {}
def _generate_gradient(self):
# Generate a random unit vector at each grid point -- this is the
# "gradient" vector, in that the grid tile slopes towards it
# 1 dimension is special, since the only unit vector is trivial;
# instead, use a slope between -1 and 1
if self.dimension == 1:
return (random.uniform(-1, 1),)
# Generate a random point on the surface of the unit n-hypersphere;
# this is the same as a random unit vector in n dimensions. Thanks
# to: http://mathworld.wolfram.com/SpherePointPicking.html
# Pick n normal random variables with stddev 1
random_point = [random.gauss(0, 1) for _ in range(self.dimension)]
# Then scale the result to a unit vector
scale = sum(n * n for n in random_point) ** -0.5
return tuple(coord * scale for coord in random_point)
[docs] def get_plain_noise(self, *point):
"""Get plain noise for a single point, without taking into account
either octaves or tiling.
"""
if len(point) != self.dimension:
raise ValueError(
"Expected {} values, got {}".format(self.dimension, len(point))
)
# Build a list of the (min, max) bounds in each dimension
grid_coords = []
for coord in point:
min_coord = math.floor(coord)
max_coord = min_coord + 1
grid_coords.append((min_coord, max_coord))
# Compute the dot product of each gradient vector and the point's
# distance from the corresponding grid point. This gives you each
# gradient's "influence" on the chosen point.
dots = []
for grid_point in product(*grid_coords):
if grid_point not in self.gradient:
self.gradient[grid_point] = self._generate_gradient()
gradient = self.gradient[grid_point]
dot = 0
for i in range(self.dimension):
dot += gradient[i] * (point[i] - grid_point[i])
dots.append(dot)
# Interpolate all those dot products together. The interpolation is
# done with smoothstep to smooth out the slope as you pass from one
# grid cell into the next.
# Due to the way product() works, dot products are ordered such that
# the last dimension alternates: (..., min), (..., max), etc. So we
# can interpolate adjacent pairs to "collapse" that last dimension. Then
# the results will alternate in their second-to-last dimension, and so
# forth, until we only have a single value left.
dim = self.dimension
while len(dots) > 1:
dim -= 1
s = smoothstep(point[dim] - grid_coords[dim][0])
next_dots = []
while dots:
next_dots.append(lerp(s, dots.pop(0), dots.pop(0)))
dots = next_dots
return dots[0] * self.scale_factor
def __call__(self, *point):
"""Get the value of this Perlin noise function at the given point. The
number of values given should match the number of dimensions.
"""
ret = 0
for o in range(self.octaves):
o2 = 1 << o
new_point = []
for i, coord in enumerate(point):
coord *= o2
if self.tile[i]:
coord %= self.tile[i] * o2
new_point.append(coord)
ret += self.get_plain_noise(*new_point) / o2
# Need to scale n back down since adding all those extra octaves has
# probably expanded it beyond ±1
# 1 octave: ±1
# 2 octaves: ±1½
# 3 octaves: ±1¾
ret /= 2 - 2 ** (1 - self.octaves)
if self.unbias:
# The output of the plain Perlin noise algorithm has a fairly
# strong bias towards the center due to the central limit theorem
# -- in fact the top and bottom 1/8 virtually never happen. That's
# a quarter of our entire output range! If only we had a function
# in [0..1] that could introduce a bias towards the endpoints...
r = (ret + 1) / 2
# Doing it this many times is a completely made-up heuristic.
for _ in range(int(self.octaves / 2 + 0.5)):
r = smoothstep(r)
ret = r * 2 - 1
return ret
def generate_perlin_noise(size=(50, 50)):
"""
:param size:
:type size:
:return:
:rtype:
"""
noise = numpy.zeros(size)
png = PerlinNoiseGenerator(2)
for i in range(noise.shape[0]):
for j in range(noise.shape[1]):
noise[i, j] = png(i / noise.shape[0], j / noise.shape[1])
return noise
if __name__ == "__main__":
print(generate_perlin_noise())


Select a file from the file navigator to the left to edit or press the add button to create a new file. When done press the publish button if you are ready.


Hangman v0.9.6 Hangman.Action.Human
Implements human action player specific functionality
In Hangman
we have two players. One explict - the one guessing, the other implicit, 'the game', 'the user tracking the penalties'.
In this instance, the Action
is merely the user making and choosing the guess selections.
The human
action is given the choice of the top letter choices to choose from and is able to make an interactive guess.
Summary
Functions
Routine for :human
player type. Performs validation of human guess, executes guess and returns round status
Sets up round by running a reduction pass. Returns top letter choices to be presented to human
Types
t :: %Hangman.Action.Human{display: term, round: term, strategy: term, type: term}
Functions
Specs
guess(t, Guess.t) :: tuple | no_return
Routine for :human
player type. Performs validation of human guess, executes guess and returns round status
Specs
setup(t) :: tuple
Sets up round by running a reduction pass. Returns top letter choices to be presented to human


1. Quokkas are bigger than you think.
2. The island is named after them.
3. They get around like kangaroos.
4. But, they can also climb trees.
5. They can survive a long time without food and water.(wow)
6. They swallow food whole, then they regurgitate it and eat it again.
7. They are peaceful with each other (cuties)
8. Quokka mums have no more than two offsprings a year.
9. Their average lifespan is 10 years.
10. They are most active at night.
11. You can be fined from touching them. They can make you sick!
12. They have sharp claws and teeth they can use against you.
13. Don't touch! Just watch.
14. They are happy to see you but mainly for food.
15. The like watching humans for entertainment.
=======
>>>>>>> 8dbc25b59bc760dddf78cb89e33c308acccfb328
30 Minute Film Festival


duc
Duc is a collection of tools for indexing, inspecting and visualizing disk usage. Duc maintains a database of accumulated sizes of directories of the file system, allowing queries this database, or create fancy graphs to show where data is.
More information: home page
- Index the /usr directory, writing to the default database location ~/.duc.db:
duc index /usr
- List all files and directories under /usr/local, showing relative file sizes in a [g]raph:
duc ls --classify --graph /usr/local
- List all files and directories under /usr/local using treeview recursively:
duc ls --classify --graph --recursive /usr/local
- Start the graphical interface to explore the file system using sunburst graphs:
duc gui /usr
- Run the ncurses console interface to explore the file system:
duc ui /usr
- Dump database info:
duc info


JDBC Migrator or: How I Learned to Stop Worrying About Buckets and Utilise the JdbcStringBasedStore!
Infinispan 9 has introduced many improvements to its marshalling codebase in order to improve performance and allow for greater flexibility. Consequently, data marshalled and persisted by Infinispan 8.x is no longer compatible with Infinispan 9.x. Furthermore, as part of our ongoing efforts to improve the cache stores provided by Infinispan, we have removed both the JdbcBinaryStore and JdbcMixedStore in Infinispan 9.0.
To assist users migrating from Infinispan 8.x, we have created the JDBC Migrator that enables existing JDBC stores to be migrated to Infinispan 9’s JdbcStringBasedStore.
No More Binary Keyed Stores!
The original intention of the JdbcBinaryStore was to provide greater flexibility over the JdbcStringBasedStore as it did not require a Key2StringMapper implementation. This was achieved by utilising the hashcode of an entries key for a table’s ID column entry. However, due to the possibility of hash collisions all entries had to be placed inside a Bucket object which was then serialised and inserted into the underlying table. Utilising buckets in this manner was far from optimal as each read/write to the underlying table required an existing bucket for a given hash to be retrieved, deserialised, updated, serialised and then re-inserted back into the db.
Introducing JDBC Migrator
The JDBCMigrator is a standalone application that takes a single argument, the path to a .properties file which must contain the configuration properties for both the source and target stores. To use the migrator you need the infinispan-tools-9.x.jar, as well as the jdbc drivers required by your source and target databases, on your classpath.
An example maven pom that launches the migrator via mvn exec:java is presented below:
Migration Examples
Below are several example .properties files used for migrating various stores, however an exhaustive list of all available properties can be found in the Infinispan user guide.
* *
Before attempting to migrate your existing stores please ensure you have backed up your database! * *
8.x JdbcBinaryStore → 9.x JdbcStringBasedStore
The most important property to set in this example is "source.marshaller.type=LEGACY" as this instructs the migrator to utilise the Infinispan 8.x marshaller to unmarshall data stored in your existing DB tables.
If you specified custom AdvancedExternalizer implementations in your Infinispan 8.x configuration, then it is necessary for you to specify these in the migrator configuration and ensure that they are available on the migrators classpath. To Specify the AdvancedExternalizers to load, it is necessary to define the "source.marshaller.externalizers" property with a comma-separated list of class names. If an ID was explicitly set for your externalizer, then it is possible to prepend the externalizers class name with "<id>:" to ensure the IDs is respected by the marshaller.
TwoWayKey2StringMapper Migration
As well as using the JDBC Migrator to migrate from Infinispan 8.x, it is also possible to utilise it to migrate from one DB dialect to another or to migrate from one TwoWayKey2StringMapper implementation to another.
Summary
Infinispan 9 stores are no longer compatible with Infinispan 8.x stores due to internal marshalling changes. Furthermore, the JdbcBinary and JdbcMixed stores have been removed due to their poor performance characteristics. To aid users in their transition from Infinispan 8.x we have created the JDBC Migrator to enable users to migrate their existing JDBC stores.
If you’re a user of the JDBC stores and have any feedback on the latest changes, let us know via the forum, issue tracker or the #infinispan channel on Freenode.


| Home | Trees | Indices | Help |
|
|---|
|
|
Transforms python objects into ZSI-compatible form.
Author<EMAIL_ADDRESS>(Joseph DiLallo)
|
|||
|
|||
|
|||
|
|
|||
__package__ =
|
|
Ensures a given object is compatible with ZSI, possibly by transforming it. Dictionaries with valid xsi_types are transformed into ZSI objects. Everything else is returned in the same data type as it was given. List and dictionary contents will be recursively checked/altered for compatibility. Args: obj: obj The python object to make ZSI compatible. Should be a dict, list, or string depending on the xsi_type. May also already be a ZSI object, in which case it is returned unaltered. xsi_type: str The WSDL-defined type of the given object. wsdl_types: dict A map of all WSDL-defined types in the same service as the given type. web_service: module The generated web service which uses this object. Returns: obj The python object passed in, compatible with ZSI. |
Transforms a python dictionary into a ZSI object. Args: wsdl_types: dict WSDL definitions of all types in the same service as the given xsi_type. obj: dict Dictionary to be made into a ZSI object. xsi_type: str The name of the complex type this dictionary represents. web_service: module The generated web service which uses this complex type. Returns: obj A ZSI object representing this complex type. |
Ensures a list is compatible with ZSI, possibly by altering its contents. Args: wsdl_types: dict WSDL definitions of all types in the same service as the given xsi_type. obj: list List to be made ready for ZSI-transport. xsi_type: str The WSDL-defined type name that the given list represents. web_service: module The generated web service which uses this list. Returns: obj A list whose contents have been transformed into ZSI-acceptable form. |
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 | http://epydoc.sourceforge.net |


Gateway
BOT
18-Sep-18 05:12 PM
[dscrdeql] <ghøst> Evening!
[dscrdeql] <Adrian > Hey guys...
[dscrdeql] <Adrian > On 25 i'm back
[dscrdeql] <c2k>
[dscrdeql] <c2k> wheres the dumb dumper when you need him...'CMON sell me smore!
[dscrdeql] <c2k>
[dscrdeql] <miles> Is that you picking up @ 30 Sats @c2k ?
[dscrdeql] <c2k> yes. and lower as well
[dscrdeql] <c2k> if anyone wants to sell me 100k lemme know
[dscrdeql] <c2k> i will do an otc trade
[dscrdeql] <Combat Wombat> @c2k 0.99btc its yours
[dscrdeql] <miles>
[dscrdeql] <c2k> 30sats for 100k
25sats for 200k
20sats for 500k
[dscrdeql] <c2k> i will trade
[dscrdeql] <Combat Wombat> nice
[dscrdeql] <Combat Wombat> cowboy
[dscrdeql] <Combat Wombat> where are you lol
[dscrdeql] <c2k> hes not selling. lol
[dscrdeql] <Combat Wombat>
[dscrdeql] <Combat Wombat> would be better to throw it on exrates and build up those buy walls
[dscrdeql] <miles> I am 5k short of a masternode - soooo close
[dscrdeql] <c2k> easy enuf miles. even if u need to pay up
[dscrdeql] <c2k> i already have a bunch of masternodes but am willing to get more
[dscrdeql] <miles> Yep !! How do the master node payouts work? Can you claim interest as you go?
[dscrdeql] <miles> Or is it locked and all released at end of term
[dscrdeql] <c2k> well in the komodo ecosystem theyre called rewards. interest is not friendly term in islam (i think thats it?) so they call it rewards
(edited)
[dscrdeql] <c2k> there is a loose schedule cowboy was talking about but im not sure where it is. when its official im sure they will post or pin it
[dscrdeql] <Combat Wombat> yeah we will get the official info soon i hope but yeah im preparing to lock some away
[dscrdeql] <Combat Wombat> not sure how much though
[dscrdeql] <miles> Didn’t know that! I use KMD rewards all the time - just wondering how the implementation will work given its a locked contract duration
[dscrdeql] <miles> But if you could claim reward during the term it would be cool as it would incentive people to lock more away knowing they would still have access to some coins if needed I guess
[dscrdeql] <Combat Wombat> not going to even claim to understand how it will work lol but miles what you said does sound nice
[dscrdeql] <Combat Wombat> cowboy is the man to talk to
[dscrdeql] <Zach> Is it considered insider trading to know that the profits from the house are going to go directly into the EQLI market price? Basically tells me how high the price is going to go
In my previous writing I told you of our past up to current events, along with where we are at. In this piece I will give you a glimpse…
[dscrdeql] <CowboyCrypto- Founder> its not if I tell everyone at the same time
[dscrdeql] <c2k> @Zach insider trading as defined by the sec (who doesnt oversee crypto anyway) is having access to non-public info
[dscrdeql] <c2k> there u go. beat me to it
[dscrdeql] <Combat Wombat>
[dscrdeql] <Podmaster> hmm....
[dscrdeql] <CowboyCrypto- Founder> crypto is going to change the world, but I assume you already know that.
[dscrdeql] <Podmaster> crypto is going to change the world we live in!
[dscrdeql] <Zach> Fair enough yeah I wouldn’t be here if I didn’t think crypto was the future
[dscrdeql] <CowboyCrypto- Founder> we are just doing our small part to see that the little guy doesnt get shafted
[dscrdeql] <Podmaster> mmhmm hm
[dscrdeql] <c2k> cmon podmaster get those marbles out of your mouth ...
[dscrdeql] <c2k>
[dscrdeql] <Zach> I look forward to telling people how I made my millions with EQLI
[dscrdeql] <CowboyCrypto- Founder> I was talkin to the other Founders about that the other day Zach, I would be happy as hell if all of you make a fortune from getting here early.
[dscrdeql] <Podmaster> i can't get those marbles out mrupphhh!!!
[dscrdeql] <Podmaster> so when will we get to see the dome of arkansas?
[dscrdeql] <CowboyCrypto- Founder> my goals really are not monetary, I just want to build houses using alternative build methods to prove it can be done on a large scale and help put people in a house
[dscrdeql] <Podmaster> just joking i know it not a dome
[dscrdeql] <CowboyCrypto- Founder> yeah wont be a dome.
[dscrdeql] <Podmaster> box of arkansas
[dscrdeql] <CowboyCrypto- Founder> I am thinking about going out there this weekend and clearing it.
[dscrdeql] <CowboyCrypto- Founder> then next weekend maybe renting a backhoe and leveling it all out.
[dscrdeql] <Podmaster> aircrete.... will you copyright the formulation and stuff?
[dscrdeql] <c2k> can a mod or someone pin that latest medium article about masternodes and stuff?


Free
Falling
Rising
Announced
Dry
Sub-total (60)
Bonus (30)
Sub-total
Column Total
SCORE
Dice
Undo
End Turn


Experience
January 2015 – Now
Principal Services Developer
Grid Dynamics
August 2014 – November 2014
Senior Developer
Strol
January 2013 – October 2014
Team Lead / Senior Developer
VIAcode
May 2010 – January 2013
.NET Developer
VIAcode
February 2009 – May 2010
QA Lead / Test Automation Engineer
YOTA
September 2007 – February 2009
C#/.Net Developer
Exigen Services StarSoft
March 2006 – May 2007


Contributing
We'd like to encourage you to contribute to the repository. You can do this by making an issue ticket or, even better, submitting a patch via a pull request.
We try to make it as easy as possible for you but there are a few things to consider when contributing. The following guidelines for contribution should be followed if you want to submit a pull request:
How to prepare
- You need a GitHub account
- Submit an issue ticket for your issue if there is not one yet. _ Describe the issue and include steps to reproduce if it's a bug. _ Ensure to mention the earliest version that you know is affected.
- If you are able and want to fix this, fork the repository on GitHub
Make Changes
- In your forked repository, create a topic branch for your upcoming patch. (e.g.
feature--autoplay
orbugfix--ios-crash
) _ Usually this is based on the master branch. _ Create a branch based on master;git branch fix/master/my_contribution master
then checkout the new branch withgit checkout fix/master/my_contribution
. Please avoid working directly on themaster
branch. - Make sure you follow the established coding style. You can run
npm run test:lint
to verify you're all set. - Make use of the
.editorconfig
-file if provided with the repository. - Make commits of logical units and describe them properly, documenting anything new that you add.
- If possible, submit tests to your patch / new feature so it can be tested easily.
- Assure nothing is broken by running all the tests via
npm test
.
Submit Changes
- Push your changes to a topic branch in your fork of the repository.
- Open a pull request to the this repository and choose the right original branch you want to patch.
- If not done in commit messages (which you really should do) please reference and update your issue with the code changes. But please do not close the issue yourself.
- We'll review your changes and respond soon, usually within a day!


|
Machine learning with R The R Bootcamp |
from gapminder.org
In this practical, you will learn how to apply cluster analysis to two data sets.
In the end, you will know how to:
Open your TheRBootcamp
R project.
Open a new R script. Write your name, the date and “Unsupervised learning Practical” as comments at the top.
## NAME
## DATUM
## Unsupervised learning practical
Save the script as Unsupervised_practical.R
in the 2_Code
folder.
Load the packages tidyverse
, cstab
, dbscan
, and mclust
.
gap
data setread_csv()
, read in gap.csv
and save it as gap
.# Read gap.csv
gap <- read_csv('1_Data/gap.csv')
Print the data set and inspect its contents.
Use summary()
to get additional insight into the data.
Use the code below to create a new data set containing only the data from year 2007 and features Lebenserwartung
and BIP pro Kopf
.
# gap in 2007
gap2007 <- gap %>%
filter(Jahr == 2007) %>%
select(`BIP pro Kopf`, Lebenserwartung)
kmeans()
, identify three clusters (centers
) in gap2007
.# kmeans of gap in 2007
gap2007_km <- kmeans(x = XX, centers = XX)
# kmeans of gap in 2007
gap2007_km <- kmeans(x = gap2007, centers = 3)
gap2007_km
and study the output.# kmeans of gap in 2007
gap2007_km
K-means clustering with 3 clusters of sizes 27, 80, 34
Cluster means:
BIP pro Kopf Lebenserwartung
1 34099 79.9
2 2809 60.3
3 13701 72.1
Clustering vector:
[1] 2 2 2 2 3 1 1 1 2 1 2 2 2 3 3 3 2 2 2 2 1 2 2 3 2 2 2 2 2 3 2 3 3 3 1 2 2
[38] 2 2 2 3 2 2 1 1 3 2 1 2 1 2 2 2 2 2 1 3 1 2 2 3 2 1 1 1 2 1 2 2 2 3 3 2 2
[75] 3 2 2 3 2 2 3 3 2 3 2 2 2 2 2 1 1 2 2 2 1 3 2 3 2 2 2 3 3 3 2 3 2 2 3 2 3
[112] 2 1 3 1 2 3 1 2 2 2 1 1 2 1 2 2 2 3 2 3 2 1 1 3 3 2 2 2 2 2
Within cluster sum of squares by cluster:
[1] 9.86e+08 3.76e+08 6.82e+08
(between_SS / total_SS = 90.7 %)
Available components:
[1] "cluster" "centers" "totss" "withinss" "tot.withinss"
[6] "betweenss" "size" "iter" "ifault"
The first row of the output and the table Cluster means
shows how many objects were assigned to each of the three clusters and where the centroids (cluster means) of these are located.
At the bottom of the output is a list of names of objects contained in the clustering object. Use gap2007_km$XX
to select the object clusters
, as well as the elements centers
and store them as clusters
and centers
respectively.
# gap2007_km
clusters <- gap2007_km$XX
centers <- gap2007_km$XX
# gap2007_km
clusters <- gap2007_km$cluster
centers <- gap2007_km$centers
# kmeans of gap in 2007
plot(gap2007, col = clusters)
# kmeans of gap in 2007
plot(gap2007, col = clusters)
points(centers, pch = 16, col = 1:3, cex = 2)
Something’s off, right? Some points of the middle cluster actually seem to lie closer to the bottom-left cluster. This shouldn’t be the case. Any ideas how this has come about?
The problem is that the features have different scales. The values of BIP pro Kopf
are way larger than those in Lebenserwartung
and, thus, a lot further away from each other. For that reason, BIP pro Kopf
plays a much larger role for cluster assignments than Lebenserwartung
. To fix this problem, run the code below, which scaled the features in gap2007
.
# scale gap in 2007
gap2007_scaled <- gap2007 %>%
scale() %>%
as_tibble()
kmeans()
for gap2007_scaled
and plot the data and cluster assignments. All good now?# kmeans plot for gap in 2007
gap2007_scaled_km <- kmeans(x = gap2007_scaled, centers = 3)
# extract elements
clusters <- gap2007_scaled_km$cluster
centers <- gap2007_scaled_km$centers
# plot
plot(gap2007_scaled, col = clusters)
points(centers, pch = 16, col = 1:3, cex = 2)
kmeans
solutions associated with 2 to 20 clusters. The code uses the gap2007_scaled
data.# within-cluster variance development
km_development <- purrr::map(2:20, kmeans, x = gap2007_scaled)
withinvar <- purrr::map_dbl(km_development,
`[[`, i = 'tot.withinss')
plot()
create a plot of the development of the withinvar
.# kmeans within-variance development
plot(withinvar)
What does the plot tell you? Is there an elbow that would suggest a particular value of k?
Several values of k seem plausible: 1, 3, or 7. Use cDistance()
from the cstab
package to estimate k with values from 2 to 20 (2:20
) as candidates.
# estimate k with cstab
k_est <- cDistance(data = as.matrix(XX),
kseq = XX:XX)
# estimate k with cstab
k_est <- cDistance(data = as.matrix(gap2007_scaled),
kseq = 2:20)
k_est$k_Gap
und k_est$k_Slope
. Do the numbers seem reasonable?# estimate k with cstab
k_est$k_Gap
[1] 14
k_est$k_Slope
[1] 3
cStability()
and extract k_instab
. Reasonable?# estimate k with cstab
k_est <- cStability(data = as.matrix(gap2007_scaled),
kseq = 2:20)
========
================
========================
================================
========================================
================================================
========================================================
================================================================
========================================================================
================================================================================
k_est$k_instab
[1] 3
Remember: There is no true k.
dbscan()
from the dbscan
package to cluster the data. Again it is essential to work with gap2007_scaled
as otherwise eps
would describe an ellipse and not a circle. Set eps
to .5
.# cluster using DBSCAN
gap2007_scaled_dbscan <- dbscan(x = XX,
eps = XX)
# cluster using DBSCAN
gap2007_scaled_dbscan <- dbscan(x = gap2007_scaled,
eps = .5)
Print gap2007_scaled_dbscan
. What does the outpute tell you? Remember 0 means outlier.
A single cluster and 5 outliers were identified. Visualize the solution using the same approach as above. The + 1
is necessary as 0 implies no color.
# extract clusters
clusters <- gap2007_scaled_dbscan$XX
# plot
plot(XX, col = XX + 1)
# extract clusters
clusters <- gap2007_scaled_dbscan$cluster
# plot
plot(gap2007_scaled, col = clusters + 1)
dbscan()
again using different values for eps
. Try eps = .3
and eps = .1
. Both times plot the results the same way as before. Any changes? Any of the solutions reasonable?# cluster using DBSCAN
gap2007_scaled_dbscan.3 <- dbscan(x = gap2007_scaled, eps = .3)
gap2007_scaled_dbscan.1 <- dbscan(x = gap2007_scaled, eps = .1)
# plot
par(mfrow = c(1, 3))
plot(gap2007_scaled, col = gap2007_scaled_dbscan$cluster + 1)
plot(gap2007_scaled, col = gap2007_scaled_dbscan.3$cluster + 1)
plot(gap2007_scaled, col = gap2007_scaled_dbscan.1$cluster + 1)
dbscan()
has additional parameters. minPts
determines the number of points within eps
necessary for a point to be a core point. If you like, try different values to explore the effect of minPts
.Mclust
from the mclust
package to cluster the date using Gaussian mixtures. This time, you can work with the original data set gap2007
as Gaussian mixtures are able to account for the differences in scale.# Gaussian mixtures
gap2007_gm <- Mclust(XX)
# Gaussian mixtures
gap2007_gm <- Mclust(gap2007)
Print the object gap2007_gm
. What do you see?
The output of gap2007_gm
reveals very little. It only shows which objects it contains. Use table(gap2007_gm$classification)
to gain an overview over the cluster assignments. How many clusters were identified and how many does each contain?
Use the classification
element to create a visualization of the cluster assignments.
# plot
plot(gap2007_scaled, col = gap2007_gm$classification)
plot(gap2007_gm, what = 'classification')
to create mclust
’s own visualization.# plot using mclust
plot(gap2007_gm, what = 'classification')
Try to understand what the ellipses in the mclust
plot reveal about the clusters. Remember they represent normal distributions with variances and co-variances reflecting the correlations between the features.
One desirable property of Gaussian mixtures is that they produce estimates of the uncertainty associated with assigning a data point to a particular cluster. Use plot(gap2007_gm, what = 'uncertainty')
to visualize this. The size of the points reflects the degree of uncertainty associated with a point being assigned to one particular cluster and not the others.
# plot
plot(gap2007_gm, what = 'uncertainty')
Mclust()
already considers a variety of implementations in addition to different values of k. You can gain an overview on the performance of these using plot(gap2007_gm, what = 'BIC')
.# plot
plot(gap2007_gm, what = 'BIC')
BIC is the Bayesian Information Criterion and it characterizes the model fit in relation to model complexity. In this case, higher BIC values indicate better performance. In the visualization you see the performance of 14 different implementations as a function of different values k (x-axis).
plot(gap2007_gm, what = 'BIC', ylim = c(-4200, -3900))
to get a better view on the critical region of the plot. Now you should be able to see that EVV
for k=4
shows the best performance overall.# plot
plot(gap2007_gm, what = 'BIC', ylim = c(-4200, -3900))
?mclustModelNames
to see descriptions for each of the model. This reveals that EEV
only makes the simplifying assumption of equal volume between the different ellipsoids. This is also what you see in plot(gap2007_gm, what = 'classification')
.plot(gap2007_gm, what = 'classification')
modelNames = 'XX'
with one of the three letter codes denoting the different models. Then visualize the result. Begin with 'EEI'
.# Try different implementation
gap2007_gm <- Mclust(gap2007, modelNames = 'XX')
plot(gap2007_gm, what = 'classification')
# Try different implementation
gap2007_gm <- Mclust(gap2007, modelNames = 'EEI')
plot(gap2007_gm, what = 'classification')
read_csv()
to read in credit.csv
as object credit
.# Read credit.csv
credit <- read_csv('1_Data/credit.csv')
Print the data set and familiarize yourself with its contents.
Use one or more of the clustering methods used above to identify clusters among credit card users. Have fun!
library(tidyverse)
library(cstab)
library(dbscan)
library(mclust, mask.ok = F)
# Example data
data(mpg)
# Process data
mpg <- mpg %>% select_if(is.numeric)
mpg_stand <- mpg %>%
scale %>% # standardize/scale data
as_tibble()
# k-means -----
# Identify clusters
mpg_km <- kmeans(mpg_stand,
centers = 3)
# Show centroids
mpg_km$centers
# k-selection -----
# Sow within-variance
km_development <- purrr::map(2:20, kmeans, x = mpg_stand)
withinvar <- purrr::map_dbl(km_development,
`[[`, i = 'tot.withinss')
# Visualize withinvar
plot(withinvar)
# Gap & Slope statistics
k_est <- cDistance(as.matrix(mpg_stand),
kseq = 2:20)
k_est$k__Gap
k_est$k_Slope
# Cluster stability
k_est <- cStability(as.matrix(mpg_stand),
kseq = 2:20)
k_est$k_instab
# DBSCAN -----
# Identify clusters
mpg_dbscan <- dbscan(mpg_stand, eps = 1)
# Show centroids
mpg %>%
mutate(cl = mpg_dbscan$cluster) %>%
group_by(cl) %>%
summarize_all(mean)
# Gaussian Mixtures -----
# Identify clusters
mpg_gm <- Mclust(mpg)
# Show centroids
mpg %>%
mutate(cl = mpg_gm$classification) %>%
group_by(cl) %>%
summarize_all(mean)
# Visualize clusters
plot(mpg_gm, what = 'classification')
# Compare clusters -----
table(mpg_km$cluster, mpg_dbscan$cluster)
table(mpg_km$cluster, mpg_gm$classification)
table(mpg_dbscan$cluster, mpg_gm$classification)
| File | Rows | Columns |
|---|---|---|
| gap.csv | 1692 | 6 |
| credit.csv | 8636 | 8 |
The gap
data set is based on the Gapminder project and has been extracted from the R package gapminder.
| Feature | Description |
|---|---|
| Land | Name of country |
| Kontinent | Name of continent |
| Jahr | year |
| Lebenserwartung | life expectancy in years |
| Population | Anzahl Population of country |
| BIP pro Kopf | GDP per capita |
The credit
data set is an excerpt of the publicly available Credit Card Dataset. The data set contains 8 features, that describe the behavior of 8636 credit card custmers.
| Variable | Beschreibung |
|---|---|
| BALANCE | Available credit |
| BALANCE_FREQUENCY | Frequency of balance changes of (1 = frequent, 0 = infrequent) |
| PURCHASES | Sum of purchases |
| CREDITLIMIT | Limit of credit card |
| ONEOFFPURCHASES | Value of largest one-off purchase |
| MINIMUM_PAYMENTS | Minimal credit card payment |
| PRCFULLPAYMENT | Percent in-full credit card payments |
| TENURE | Duration of credit card account |
| Paket | Installation |
|---|---|
tidyverse |
install.packages("tidyverse") |
cstab |
install.packages("cstab") |
dbscan |
install.packages("dbscan") |
mclust |
install.packages("mclust") |
Clustering
| Function | Package | Description |
|---|---|---|
kmeans() |
stats |
Cluster data with k-means |
dbscan() |
dbscan |
Cluster data with DBSCAN |
Mclust() |
mclust |
Cluster data with Gaussian mixtures |
k-selection
| Function | Package | Description |
|---|---|---|
cDistance() |
cstab |
Identify k with distance-based methods, e.g., gap statistic. |
cStability() |
cstab |
Identify k with instability-based methods. |


Advance Java-Programming
Introduction
Class
The class is at the core of Java. It is the logical construct upon which the entire Java language is built because it defines the shape and nature of an object. As such,the class forms the basis for object-oriented programming in Java. Any concept you wish to implement in a Java program must be encapsulated within a class.
Perhaps the most important thing to understand about a class is that it defines a new data type. Once defined, this new type can be used to create objects of that type. Thus, a class is a template for an object, and an object is an instance of a class. Because an object is an instance of a class, you will often see the two words object and instance used interchangeably.
The general form of class
class classname {
type instance-variable1;
type instance-variable2;
// ...
type instance-variableN
; type methodname1(parameter-list) {
// body of method1
}
type methodname2(parameter-list) {
// body of method2
}
// ...
type methodnameN(parameter-list) {
// body of methodN
}
}
The data, or variables, defined within a class are called instance variables. The code is contained within methods. Collectively, the methods and variables defined within a class are called members of the class.
Example of Class
class Box {
double width;
double height;
double depth;
// compute and return volume
double volume() {
return width * height * depth;
}
// sets dimensions of box
void setDim(double w, double h, double d) {
width = w;
height = h;
depth = d;
}
}
class BoxDemo {
public static void main(String args[]) {
Box mybox1 = new Box();
Box mybox2 = new Box();
double vol;
// initialize each box
mybox1.setDim(10, 20, 15);
mybox2.setDim(3, 6, 9);
// get volume of first box
vol = mybox1.volume();
System.out.println("Volume is " + vol);
// get volume of second box
vol = mybox2.volume();
System.out.println("Volume is " + vol);
}
}
Creating Objects
When you create a class, you are creating a new data type. You can use this type to declare objects of that type. However, obtaining objects of a class is a two-step process. First, you must declare a variable of the class type. This variable does not define an object. Instead, it is simply a variable that can refer to an object. Second, you must acquire an actual, physical copy of the object and assign it to that variable. You can do this using the new operator. The new operator dynamically allocates (that is, allocates at run time) memory for an object and returns a reference to it. This reference is, more or less, the address in memory of the object allocated by new.This reference is then stored in the variable. Thus, in Java, all class objects must be dynamically allocated. Box mybox = new Box();
This statement combines the two steps just described. It can be rewritten like this to show each step more clearly:
Box mybox; // declare reference to object
mybox = new Box(); // allocate a Box object
Constructors
Java allows objects to initialize themselves when they are created. This automatic initialization is performed through the use of a constructor. A constructor initializes an object immediately upon creation. It has the same name as the class in which it resides and is syntactically similar to a method. Once defined, the constructor is automatically called immediately after the object is created, before the new operator completes.
/* Here, Box uses a constructor to initialize the dimensions of a box.*/
class Box {
double width;
double height;
double depth;
// This is the constructor for Box.
Box() {
System.out.println("Constructing Box");
width = 10;
height = 10;
depth = 10;
}
// compute and return volume
double volume() {
return width * height * depth;
}
}
class BoxDemo6 {
public static void main(String args[]) {
// declare, allocate, and initialize Box objects
Box mybox1 = new Box();
Box mybox2 = new Box();
double vol;
// get volume of first box
vol = mybox1.volume();
System.out.println("Volume is " + vol);
// get volume of second box
vol = mybox2.volume();
System.out.println("Volume is " + vol);
}
}
When this program is run, it generates the following results:
Constructing Box
Constructing Box
Volume is 1000.0
Volume is 1000.0


Graduate studies within any single scientific discipline are challenging endeavors on their own. But imagine combining graduate school-level training in physics and mathematics with advanced research in engineering and biology.
Two graduate students in the Division of Biological Sciences, Danielle Hagstrom and Ben Rubin, have been awarded fellowships that recognize exceptional students pursuing research in the natural sciences, engineering and medicine from the San Diego chapter of the ARCS Foundation, Inc.
Connect with Us


From the death certificate of
Wilina Kinkade,* #62142
Bethel Township, Monroe
County, Ohio
female, white
birth: Mar. 5, 1914
age: 7 mos 9 da
father Douglas Kinkade, born
Ohio; mother Ada Nalley, born Ohio
informant: Douglas Kinkade,*
* Graysville . . . .
death: Nov. 14, 1914, 4 p.m.* * *
attended by physician from
Oct. 1, 1914 to Nov. 10, 1914 when last seen alive by physician
cause of death: tuberculosis
physician: J. S. Peter,* * * * Harriettsville
burial: Pleasant R. Cem., Nov. 15, 1914
Submitter's Notes:
* The cursive writing of her name on this certificate appears to be Wilina to me. In the book by Ben Dixon, OUR BOOK: OUR ANCESTOR, OURSELVES, OUR CHILDREN it is listed as Willene. In the MONROE COUNTY, OHIO CEMETERY INSCRIPTIONS: BENTON AND WASHINGTON TOWNSHIPS book published by the Monroe County Chapter of the Ohio Genealogical Society her tombstone shows Neva W. as the d/o D.J. & A. H. Kinkade. The transcriber that listed the information on the Ohio Death Index that was used on line (<http://www.ohiohistory.org/dindex/index.cfm>) to get the certificate number gave her name as Thelma.
Provided by Betty Latta Kitchen
Click here for the Short-Cut Table of Contents


Stanford Department of Psychology
In this experiment, you will read a scenario and answer questions about how you would respond. You will also answer some questions about your experince.
Note: you won't be able to preview this HIT before accepting it because it's so short.
By answering the following questions, you are participating in a study being performed by the Stanford Department of Psychology. If you have questions about this research, please contact us at please contact us at<EMAIL_ADDRESS>You must be at least 18 years old to participate. Your participation in this research is voluntary. You may decline to answer any or all of the following questions. You may decline further participation, at any time, without adverse consequences. Your anonymity is assured; the researchers who have requested your participation will not receive any personal information about you. Note however that we have recently been made aware that your public Amazon.com profile can be accessed via your worker ID if you do not choose to opt out. If you would like to opt out of this feature, you may follow instructions available here.
Imagine that you just bought an MP3 player and you want to sell some of your old CDs since you no longer need them. One of the CDs you want to sell is the album, "Forty Licks" by The Rolling Stones.
Even though the CD is used, it is in reasonably good condition (case intact, no scratches on disc).
Using the scale below, indicate how the negotition situation made you feel...
| Powerless | Powerful |
| No control | In control |
| Weak | Strong |
| Unconfident | Confident |
|
|
Music Preferences
Most modern theories of decision making recognize the fact that decisions do not take place in a vacuum. Inidividual preferences and knowledge, along with situational variables, can greatly impact the decision process. In order to facilitate our research on decision making, we are interesed in knowing certain factors about you, the decision maker. Specifically, we are interested in whether you actually take the time to read the directions; if not, then some of our manipulations that rely on changes in the instructions will be ineffective. So, in order to demonstrate that you have read the instructions, please ignore the options provided, and simply choose the three activities "Metallica," "Roxette," and "Bad Religion." Thank you very much.

What is your ethnicity?
|
|


The Model API is a JAXB-like framework that partially maps First Order Predicate Logic constructs to Object Oriented (OO) constructs to facilitate application development. The API consolidates frequently used logic to OO idioms and generates a domain specific API given a vocabulary subset from the KB.
The Knowledge Base is a Predicate Logic-based model of real-world domain/concepts. Developing applications using a typical OO language requires translating the KB-based model to OO model. MAPI automates this process to streamline application development targeting the KB. It avoids duplication and inconsistency of hand-written OO models, helps reflect OE changes naturally to OO, supports a typical IDE in identifying changes at compile time, and provides OE details in the IDE.
The Domain Specific APIs generated by this API typically refer to real-world object, rather than Predicate Logic representations as in the KB API and implementation representations as in Base API.


Welcome to my Website!
I'm excited to learn Django!
Here is a link to the official Django Website
Here is a pic of the Python Logo
Here are three reasons Django is cool
Fast
Secure
Scalable


We're sorry but esp-steppermotor-server-ui doesn't work properly without JavaScript enabled. Please enable it to continue.


This site is designed to be used for fun at Shtekata.
You can find another interesting things at this link:
https://github.com/Shtekata Angular course Copyright © 2020


RT @pat_shaughnessy: Turns out there is no performance benefit to using single quotes: "Rubyists: Just use double-quoted strings" http://t.…
1/21/2015, 6:50:31 AM
Favs: 0
Retweets: 0
link--- layout: tweet ---
RT @pat_shaughnessy: Turns out there is no performance benefit to using single quotes: "Rubyists: Just use double-quoted strings" http://t.…
1/21/2015, 6:50:31 AM
Favs: 0
Retweets: 0
link


The Sweet Hereafter (1997)
Grade: 59
Atom Egoyan directed, co-produced, and wrote the screenplay for "The Sweet Hereafter", a critically acclaimed film about a tragic school bus accident and its effect on a small town. While parts of the film are good, it never fully takes off, and the lead character (a grim lawyer with family problems) is disappointing.
The story is told through a series of chronologically jumbled pieces, sometimes leaving the viewer confused as to whether the scene took place before or after the accident. Friendly, dependable Mrs. Driscoll (Gabrielle Rose) has been driving the school bus for the past twenty years. This time, however, the bus hits an ice patch, and careens off the road onto a frozen lake. The ice cracks, the bus sinks, and some children die, while some survive with injuries, as does Mrs. Driscoll.
While the parents are still shocked and grieving, middle-aged lawyer Mitchell Stephens (Ian Holm) arrives on the scene, seeking to file a class action lawsuit against someone or something, and enlisting the parents, children and bus driver to his cause. To complicate the plot, Stephens has a runaway, drug-addicted daughter (Caerthan Banks), and we learn that several of the parents are involved in illicit affairs, which apparently includes incest.
Those who love disaster films will be disappointed in the accident scene: we see the bus go off the road, but we don't see what is happening inside. The chaos, drama and horror of the actual accident is bypassed.
The gloomy atmosphere is shared by the entire cast. Driscoll and her stroke victim husband (David Hemblen) are well-defined characters, as is paralyzed teenager Nicole (Sarah Polley). However, Stephens, an unhappy, reflective man, seems to come alive only when somebody (including himself) is angry.
The reservations I had with the film were not shared by the Academy, which gave "The Sweet Hereafter" Oscar nominations for Best Director and Best Adapted Screenplay. The film also won the Cannes "Special Grand Prize of the Jury".
<EMAIL_ADDRESS>http://members.tripod.com/~Brian_Koller/movies.html
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews