- 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:
@@ -65,7 +65,8 @@ private:
|
||||
public:
|
||||
//==============================================================================
|
||||
/** Creates an empty array. */
|
||||
Array() noexcept : numUsed (0)
|
||||
Array() noexcept
|
||||
: numUsed (0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -88,8 +88,9 @@ NamedValueSet& NamedValueSet::operator= (NamedValueSet&& other) noexcept
|
||||
}
|
||||
#endif
|
||||
|
||||
NamedValueSet::~NamedValueSet() noexcept
|
||||
NamedValueSet::~NamedValueSet()
|
||||
{
|
||||
clear();
|
||||
}
|
||||
|
||||
void NamedValueSet::clear()
|
||||
@@ -112,7 +113,7 @@ int NamedValueSet::size() const noexcept
|
||||
return values.size();
|
||||
}
|
||||
|
||||
const var& NamedValueSet::operator[] (const Identifier& name) const noexcept
|
||||
const var& NamedValueSet::operator[] (const Identifier& name) const
|
||||
{
|
||||
if (const var* v = getVarPointer (name))
|
||||
return *v;
|
||||
@@ -169,7 +170,7 @@ bool NamedValueSet::set (Identifier name, const var& newValue)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool NamedValueSet::contains (const Identifier& name) const noexcept
|
||||
bool NamedValueSet::contains (const Identifier& name) const
|
||||
{
|
||||
return getVarPointer (name) != nullptr;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
#endif
|
||||
|
||||
/** Destructor. */
|
||||
~NamedValueSet() noexcept;
|
||||
~NamedValueSet();
|
||||
|
||||
bool operator== (const NamedValueSet&) const;
|
||||
bool operator!= (const NamedValueSet&) const;
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
If the name isn't found, this will return a void variant.
|
||||
@see getProperty
|
||||
*/
|
||||
const var& operator[] (const Identifier& name) const noexcept;
|
||||
const var& operator[] (const Identifier& name) const;
|
||||
|
||||
/** Tries to return the named value, but if no such value is found, this will
|
||||
instead return the supplied default value.
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
#endif
|
||||
|
||||
/** Returns true if the set contains an item with the specified name. */
|
||||
bool contains (const Identifier& name) const noexcept;
|
||||
bool contains (const Identifier& name) const;
|
||||
|
||||
/** Removes a value from the set.
|
||||
@returns true if a value was removed; false if there was no value
|
||||
|
||||
@@ -830,7 +830,7 @@ public:
|
||||
This will use a comparator object to sort the elements into order. The object
|
||||
passed must have a method of the form:
|
||||
@code
|
||||
int compareElements (ElementType* first, ElementType* second);
|
||||
int compareElements (ElementType first, ElementType second);
|
||||
@endcode
|
||||
|
||||
..and this method must return:
|
||||
|
||||
Reference in New Issue
Block a user