- use expectations
- improved gibbs sampling - LayerArray is template class git-svn-id: http://moon:8086/svn/software/trunk/projects/RBM@18 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -83,8 +83,8 @@ public:
|
||||
void transformPoint (ValueType& x, ValueType& y) const noexcept
|
||||
{
|
||||
const ValueType oldX = x;
|
||||
x = static_cast<ValueType> (mat00 * oldX + mat01 * y + mat02);
|
||||
y = static_cast<ValueType> (mat10 * oldX + mat11 * y + mat12);
|
||||
x = static_cast <ValueType> (mat00 * oldX + mat01 * y + mat02);
|
||||
y = static_cast <ValueType> (mat10 * oldX + mat11 * y + mat12);
|
||||
}
|
||||
|
||||
/** Transforms two 2D coordinates using this matrix.
|
||||
@@ -97,10 +97,10 @@ public:
|
||||
ValueType& x2, ValueType& y2) const noexcept
|
||||
{
|
||||
const ValueType oldX1 = x1, oldX2 = x2;
|
||||
x1 = static_cast<ValueType> (mat00 * oldX1 + mat01 * y1 + mat02);
|
||||
y1 = static_cast<ValueType> (mat10 * oldX1 + mat11 * y1 + mat12);
|
||||
x2 = static_cast<ValueType> (mat00 * oldX2 + mat01 * y2 + mat02);
|
||||
y2 = static_cast<ValueType> (mat10 * oldX2 + mat11 * y2 + mat12);
|
||||
x1 = static_cast <ValueType> (mat00 * oldX1 + mat01 * y1 + mat02);
|
||||
y1 = static_cast <ValueType> (mat10 * oldX1 + mat11 * y1 + mat12);
|
||||
x2 = static_cast <ValueType> (mat00 * oldX2 + mat01 * y2 + mat02);
|
||||
y2 = static_cast <ValueType> (mat10 * oldX2 + mat11 * y2 + mat12);
|
||||
}
|
||||
|
||||
/** Transforms three 2D coordinates using this matrix.
|
||||
@@ -114,12 +114,12 @@ public:
|
||||
ValueType& x3, ValueType& y3) const noexcept
|
||||
{
|
||||
const ValueType oldX1 = x1, oldX2 = x2, oldX3 = x3;
|
||||
x1 = static_cast<ValueType> (mat00 * oldX1 + mat01 * y1 + mat02);
|
||||
y1 = static_cast<ValueType> (mat10 * oldX1 + mat11 * y1 + mat12);
|
||||
x2 = static_cast<ValueType> (mat00 * oldX2 + mat01 * y2 + mat02);
|
||||
y2 = static_cast<ValueType> (mat10 * oldX2 + mat11 * y2 + mat12);
|
||||
x3 = static_cast<ValueType> (mat00 * oldX3 + mat01 * y3 + mat02);
|
||||
y3 = static_cast<ValueType> (mat10 * oldX3 + mat11 * y3 + mat12);
|
||||
x1 = static_cast <ValueType> (mat00 * oldX1 + mat01 * y1 + mat02);
|
||||
y1 = static_cast <ValueType> (mat10 * oldX1 + mat11 * y1 + mat12);
|
||||
x2 = static_cast <ValueType> (mat00 * oldX2 + mat01 * y2 + mat02);
|
||||
y2 = static_cast <ValueType> (mat10 * oldX2 + mat11 * y2 + mat12);
|
||||
x3 = static_cast <ValueType> (mat00 * oldX3 + mat01 * y3 + mat02);
|
||||
y3 = static_cast <ValueType> (mat10 * oldX3 + mat11 * y3 + mat12);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
@@ -231,7 +231,8 @@ public:
|
||||
float x10, float y10,
|
||||
float x01, float y01) noexcept;
|
||||
|
||||
/** Returns the transform that will map three specified points onto three target points. */
|
||||
/** Returns the transform that will map three specified points onto three target points.
|
||||
*/
|
||||
static AffineTransform fromTargetPoints (float sourceX1, float sourceY1, float targetX1, float targetY1,
|
||||
float sourceX2, float sourceY2, float targetX2, float targetY2,
|
||||
float sourceX3, float sourceY3, float targetX3, float targetY3) noexcept;
|
||||
|
||||
Reference in New Issue
Block a user