- 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:
@@ -102,7 +102,9 @@ public:
|
||||
lineLength = 0;
|
||||
lineLengthWithoutNewLines = 0;
|
||||
|
||||
for (String::CharPointerType t (line.getCharPointer());;)
|
||||
String::CharPointerType t (line.getCharPointer());
|
||||
|
||||
for (;;)
|
||||
{
|
||||
const juce_wchar c = t.getAndAdvance();
|
||||
|
||||
@@ -240,16 +242,16 @@ CodeDocument::Position::Position() noexcept
|
||||
}
|
||||
|
||||
CodeDocument::Position::Position (const CodeDocument& ownerDocument,
|
||||
const int lineNum, const int index) noexcept
|
||||
: owner (const_cast<CodeDocument*> (&ownerDocument)),
|
||||
characterPos (0), line (lineNum),
|
||||
indexInLine (index), positionMaintained (false)
|
||||
const int line_, const int indexInLine_) noexcept
|
||||
: owner (const_cast <CodeDocument*> (&ownerDocument)),
|
||||
characterPos (0), line (line_),
|
||||
indexInLine (indexInLine_), positionMaintained (false)
|
||||
{
|
||||
setLineAndIndex (lineNum, index);
|
||||
setLineAndIndex (line_, indexInLine_);
|
||||
}
|
||||
|
||||
CodeDocument::Position::Position (const CodeDocument& ownerDocument, const int characterPos_) noexcept
|
||||
: owner (const_cast<CodeDocument*> (&ownerDocument)),
|
||||
: owner (const_cast <CodeDocument*> (&ownerDocument)),
|
||||
positionMaintained (false)
|
||||
{
|
||||
setPosition (characterPos_);
|
||||
@@ -856,7 +858,7 @@ void CodeDocument::insert (const String& text, const int insertPos, const bool u
|
||||
}
|
||||
|
||||
maximumLineLength = -1;
|
||||
Array<CodeDocumentLine*> newLines;
|
||||
Array <CodeDocumentLine*> newLines;
|
||||
CodeDocumentLine::createLines (newLines, textInsideOriginalLine);
|
||||
jassert (newLines.size() > 0);
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
const CodeDocument::Position& selStart,
|
||||
const CodeDocument::Position& selEnd)
|
||||
{
|
||||
Array<SyntaxToken> newTokens;
|
||||
Array <SyntaxToken> newTokens;
|
||||
newTokens.ensureStorageAllocated (8);
|
||||
|
||||
if (tokeniser == nullptr)
|
||||
@@ -129,13 +129,13 @@ private:
|
||||
int tokenType;
|
||||
};
|
||||
|
||||
Array<SyntaxToken> tokens;
|
||||
Array <SyntaxToken> tokens;
|
||||
int highlightColumnStart, highlightColumnEnd;
|
||||
|
||||
static void createTokens (int startPosition, const String& lineText,
|
||||
CodeDocument::Iterator& source,
|
||||
CodeTokeniser& tokeniser,
|
||||
Array<SyntaxToken>& newTokens)
|
||||
Array <SyntaxToken>& newTokens)
|
||||
{
|
||||
CodeDocument::Iterator lastIterator (source);
|
||||
const int lineLength = lineText.length();
|
||||
@@ -168,7 +168,7 @@ private:
|
||||
source = lastIterator;
|
||||
}
|
||||
|
||||
static void replaceTabsWithSpaces (Array<SyntaxToken>& tokens, const int spacesPerTab)
|
||||
static void replaceTabsWithSpaces (Array <SyntaxToken>& tokens, const int spacesPerTab)
|
||||
{
|
||||
int x = 0;
|
||||
for (int i = 0; i < tokens.size(); ++i)
|
||||
@@ -287,8 +287,8 @@ public:
|
||||
|
||||
void paint (Graphics& g) override
|
||||
{
|
||||
jassert (dynamic_cast<CodeEditorComponent*> (getParentComponent()) != nullptr);
|
||||
const CodeEditorComponent& editor = *static_cast<CodeEditorComponent*> (getParentComponent());
|
||||
jassert (dynamic_cast <CodeEditorComponent*> (getParentComponent()) != nullptr);
|
||||
const CodeEditorComponent& editor = *static_cast <CodeEditorComponent*> (getParentComponent());
|
||||
|
||||
g.fillAll (editor.findColour (CodeEditorComponent::backgroundColourId)
|
||||
.overlaidWith (editor.findColour (lineNumberBackgroundId)));
|
||||
@@ -412,7 +412,7 @@ bool CodeEditorComponent::isTextInputActive() const
|
||||
return true;
|
||||
}
|
||||
|
||||
void CodeEditorComponent::setTemporaryUnderlining (const Array<Range<int> >&)
|
||||
void CodeEditorComponent::setTemporaryUnderlining (const Array <Range<int> >&)
|
||||
{
|
||||
jassertfalse; // TODO Windows IME not yet supported for this comp..
|
||||
}
|
||||
@@ -1235,7 +1235,7 @@ ApplicationCommandTarget* CodeEditorComponent::getNextCommandTarget()
|
||||
return findFirstTargetParentComponent();
|
||||
}
|
||||
|
||||
void CodeEditorComponent::getAllCommands (Array<CommandID>& commands)
|
||||
void CodeEditorComponent::getAllCommands (Array <CommandID>& commands)
|
||||
{
|
||||
const CommandID ids[] = { StandardApplicationCommandIDs::cut,
|
||||
StandardApplicationCommandIDs::copy,
|
||||
@@ -1569,7 +1569,7 @@ void CodeEditorComponent::updateCachedIterators (int maxLineNum)
|
||||
|
||||
CodeDocument::Iterator* t = new CodeDocument::Iterator (last);
|
||||
cachedIterators.add (t);
|
||||
const int targetLine = jmin (maxLineNum, last.getLine() + linesBetweenCachedSources);
|
||||
const int targetLine = last.getLine() + linesBetweenCachedSources;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
||||
@@ -40,12 +40,17 @@
|
||||
|
||||
//==============================================================================
|
||||
#if JUCE_MAC
|
||||
#define Point CarbonDummyPointName
|
||||
#define Component CarbonDummyCompName
|
||||
#import <WebKit/WebKit.h>
|
||||
#import <IOKit/IOKitLib.h>
|
||||
#import <IOKit/IOCFPlugIn.h>
|
||||
#import <IOKit/hid/IOHIDLib.h>
|
||||
#import <IOKit/hid/IOHIDKeys.h>
|
||||
#import <IOKit/pwr_mgt/IOPMLib.h>
|
||||
#import <Carbon/Carbon.h> // still needed for SetSystemUIMode()
|
||||
#undef Point
|
||||
#undef Component
|
||||
|
||||
#elif JUCE_IOS
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ private:
|
||||
ScopedPointer<Slider> sliders[4];
|
||||
ScopedPointer<ColourSpaceView> colourSpace;
|
||||
ScopedPointer<HueSelectorComp> hueSelector;
|
||||
OwnedArray<SwatchComponent> swatchComponents;
|
||||
OwnedArray <SwatchComponent> swatchComponents;
|
||||
const int flags;
|
||||
int edgeGap;
|
||||
Rectangle<int> previewArea;
|
||||
|
||||
@@ -226,9 +226,6 @@ void WebBrowserComponent::goToURL (const String& url,
|
||||
|
||||
blankPageShown = false;
|
||||
|
||||
if (browser->browser == nullptr)
|
||||
checkWindowAssociation();
|
||||
|
||||
browser->goToURL (url, headers, postData);
|
||||
}
|
||||
|
||||
@@ -265,10 +262,7 @@ void WebBrowserComponent::refresh()
|
||||
void WebBrowserComponent::paint (Graphics& g)
|
||||
{
|
||||
if (browser->browser == nullptr)
|
||||
{
|
||||
g.fillAll (Colours::white);
|
||||
checkWindowAssociation();
|
||||
}
|
||||
}
|
||||
|
||||
void WebBrowserComponent::checkWindowAssociation()
|
||||
|
||||
Reference in New Issue
Block a user