- 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:
2014-10-06 17:08:50 +00:00
parent f62f1283f8
commit fc758b853a
122 changed files with 1053 additions and 1149 deletions
@@ -25,7 +25,8 @@
class ComponentAnimator::AnimationTask
{
public:
AnimationTask (Component* const comp) noexcept : component (comp)
AnimationTask (Component* const comp)
: component (comp)
{
}
@@ -33,7 +34,7 @@ public:
float finalAlpha,
int millisecondsToSpendMoving,
bool useProxyComponent,
double startSpd, double endSpd)
double startSpeed_, double endSpeed_)
{
msElapsed = 0;
msTotal = jmax (1, millisecondsToSpendMoving);
@@ -50,10 +51,10 @@ public:
bottom = component->getBottom();
alpha = component->getAlpha();
const double invTotalDistance = 4.0 / (startSpd + endSpd + 2.0);
startSpeed = jmax (0.0, startSpd * invTotalDistance);
const double invTotalDistance = 4.0 / (startSpeed_ + endSpeed_ + 2.0);
startSpeed = jmax (0.0, startSpeed_ * invTotalDistance);
midSpeed = invTotalDistance;
endSpeed = jmax (0.0, endSpd * invTotalDistance);
endSpeed = jmax (0.0, endSpeed_ * invTotalDistance);
if (useProxyComponent)
proxy = new ProxyComponent (*component);
@@ -148,10 +148,10 @@ public:
private:
//==============================================================================
class AnimationTask;
OwnedArray<AnimationTask> tasks;
OwnedArray <AnimationTask> tasks;
uint32 lastTime;
AnimationTask* findTaskFor (Component*) const noexcept;
AnimationTask* findTaskFor (Component* component) const noexcept;
void timerCallback();
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComponentAnimator)
@@ -238,7 +238,7 @@ void ComponentBuilder::updateChildComponents (Component& parent, const ValueTree
const int numExistingChildComps = parent.getNumChildComponents();
Array<Component*> componentsInOrder;
Array <Component*> componentsInOrder;
componentsInOrder.ensureStorageAllocated (numExistingChildComps);
{
@@ -226,7 +226,7 @@ public:
private:
//=============================================================================
OwnedArray<TypeHandler> types;
OwnedArray <TypeHandler> types;
ScopedPointer<Component> component;
ImageProvider* imageProvider;
#if JUCE_DEBUG