RE: Inline:Cpp to speed up adaptive questionnaire
[email protected] ("M.F. Jonker") Sun, 28 May 2017 12:02:29 +0000
| Newsgroups | perl.inline |
|---|---|
| Message-ID | <[email protected]> |
--_000_FBA1921A84DC6544B515D072CEA75E689246BCA8stffmb05staffeu_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Dear Ed & others,
Many thanks for your reply! A inline module sounds (much) better, but looki=
ng through the documentation it seems a bit beyond my current skill level.
If you/someone else on the list would be available to implement this as a s=
mall project, please let me know! I have some funding available.
But for now, I'll use inline:CPP directly - and to clarify my previous expl=
anation, the "dlib/matrix" is indeed an external library that will not be f=
ound automatically..
So, I've looked at the Inline C documentation, and probably need something =
like this in Inline Cpp format:
use Inline C =3D> config =3D> libs =3D> '-L/your/path -lyourlib';
I also need to provide the following commands to the GCC compiler:
'-std=3Dc++11 -O3 -fopenmp'
but haven't found any documentation on this yet..
And I need to make sure that inlines writes to a location where it has read=
/write permission:
use Inline (Config =3D> DIRECTORY =3D> '/usr/local/apache/Inline', );
because I my survey system uses CGI (wasn't aware of this before, but I not=
iced this in the Inline C documentation)
Could you/someone else show me how to implement this (correctly) in the Per=
l script below)?
Many thanks,
Marcel
[% Begin Unverified Perl
use Inline 'CPP';
# Script for tasks 2-21
my $task =3D 9;
my $prevTask =3D $task-1;
# A. Add the previous choice task to =93observedVector=94
my @observedVector =3D GETVALUE("observedVector");
push @observedVector, VALUE("task".$prevTask);
SETVALUE("observedVector",join("",@observedVector));
# B. Remove the previous choice task from =93futureVector=94
my @futureVector =3D GETVALUE("futureVector");
splice @futureVector, 0, 10;
# C. CALL C++ FUNCTION:
# something (approximately) like this:
@futureVector =3D CppAdaptive(@pastVector,@futureVector,$prevTask);
# D. Save futureVector and set next choice task
SETVALUE("futureVector",join("",@futureVector));
SETVALUE("task".$task, substr(@futurevector,1,10));
__END__
__CPP__
use Inline (Config =3D> DIRECTORY =3D> '/usr/local/apache/Inline', );
use Inline Cpp =3D> config =3D> libs =3D> '-L/your/path -lyourlib';
# pass '-std=3Dc++11 -O3 -fopenmp' to the compiler
#include <string>
#include "dlib/matrix.h"
using namespace std;
using namespace dlib;
string CppAdaptive(const string &observedVector,
const string &futureVector,
const int prevTask) {
// test dlib matrix module integration
matrix <int> design(12, 6);
design =3D 1, 3, 3, 3, 1, 1,
1, 3, 1, 3, 1, 3,
1, 1, 2, 2, 2, 1,
2, 2, 1, 1, 3, 2,
2, 3, 2, 1, 1, 3,
3, 3, 1, 1, 2, 3,
2, 1, 3, 3, 2, 2,
3, 1, 3, 2, 2, 2,
3, 2, 1, 2, 3, 3,
3, 2, 2, 1, 3, 1,
1, 2, 3, 2, 1, 2,
2, 1, 2, 3, 3, 2;
// return futureVector
return futureVector;
}
End Unverified %]
--_000_FBA1921A84DC6544B515D072CEA75E689246BCA8stffmb05staffeu_
Content-Type: text/html; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<html dir=3D"ltr">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-1=
252">
<style id=3D"owaParaStyle" type=3D"text/css">=0A=
<!--=0A=
p=0A=
{margin-top:0;=0A=
margin-bottom:0}=0A=
-->=0A=
P {margin-top:0;margin-bottom:0;}</style>
</head>
<body dir=3D"ltr" fpstyle=3D"1" ocsi=3D"0">
<div style=3D"direction: ltr;font-family: Tahoma;color: #000000;font-size: =
10pt;">Dear Ed & others,<br>
<br>
Many thanks for your reply! A inline module sounds (much) better, but looki=
ng through the documentation it seems a bit beyond my current skill level.
<br>
If you/someone else on the list would be available to implement this as a s=
mall project, please let me know! I have some funding available.<br>
<br>
But for now, I'll use inline:CPP directly - and to clarify my previous expl=
anation, the "dlib/matrix" is indeed an external library that wil=
l not be found automatically..<br>
So, I've looked at the Inline C documentation, and probably need something =
like this in Inline Cpp format:<font face=3D"Tahoma"><code class=3D"perl ke=
yword"><br>
<b>use Inline C =3D> config =3D> libs =3D> '-L/your/path -lyourlib=
';</b></code><code class=3D"perl plain"></code></font><br>
<code class=3D"perl plain"></code>
<div class=3D"container">
<div class=3D"line number1 index0 alt2"><br>
I also need to provide the following commands to the GCC compiler:<br>
</div>
</div>
<font size=3D"2"><b>'-std=3Dc++11<code></code> -O3 -fopenmp'</b><br=
>
but haven't found any documentation on this yet..<br>
</font><br>
And I need to make sure that inlines writes to a location where it has read=
/write permission:<font face=3D"Tahoma"><span class=3D"sh_keyword"><br>
<b>use</b></span><b> <span class=3D"sh_function">Inline</span> <span class=
=3D"sh_symbol">
(</span>Config <span class=3D"sh_symbol">=3D></span> DIRECTORY <span cla=
ss=3D"sh_symbol">
=3D></span> <span class=3D"sh_string">'/usr/local/apache/Inline'</span><=
span class=3D"sh_symbol">,</span>
<span class=3D"sh_symbol">);</span></b></font><code class=3D"perl keyword">=
<br>
<font face=3D"Tahoma" size=3D"2">because I my survey system uses CGI (wasn'=
t aware of this before, but I noticed this in the Inline C documentation)</=
font><br>
</code><br>
Could you/someone else show me how to implement this (correctly) in the Per=
l script below)?
<br>
<br>
<!--[if gte mso 9]><xml>=0A=
<w:WordDocument>=0A=
<w:View>Normal</w:View>=0A=
<w:Zoom>0</w:Zoom>=0A=
<w:TrackMoves/>=0A=
<w:TrackFormatting/>=0A=
<w:HyphenationZone>21</w:HyphenationZone>=0A=
<w:PunctuationKerning/>=0A=
<w:ValidateAgainstSchemas/>=0A=
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>=0A=
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>=0A=
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>=0A=
<w:DoNotPromoteQF/>=0A=
<w:LidThemeOther>NL</w:LidThemeOther>=0A=
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>=0A=
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>=0A=
<w:Compatibility>=0A=
<w:BreakWrappedTables/>=0A=
<w:SnapToGridInCell/>=0A=
<w:WrapTextWithPunct/>=0A=
<w:UseAsianBreakRules/>=0A=
<w:DontGrowAutofit/>=0A=
<w:SplitPgBreakAndParaMark/>=0A=
<w:DontVertAlignCellWithSp/>=0A=
<w:DontBreakConstrainedForcedTables/>=0A=
<w:DontVertAlignInTxbx/>=0A=
<w:Word11KerningPairs/>=0A=
<w:CachedColBalance/>=0A=
</w:Compatibility>=0A=
<m:mathPr>=0A=
<m:mathFont m:val=3D"Cambria Math"/>=0A=
<m:brkBin m:val=3D"before"/>=0A=
<m:brkBinSub m:val=3D"--"/>=0A=
<m:smallFrac m:val=3D"off"/>=0A=
<m:dispDef/>=0A=
<m:lMargin m:val=3D"0"/>=0A=
<m:rMargin m:val=3D"0"/>=0A=
<m:defJc m:val=3D"centerGroup"/>=0A=
<m:wrapIndent m:val=3D"1440"/>=0A=
<m:intLim m:val=3D"subSup"/>=0A=
<m:naryLim m:val=3D"undOvr"/>=0A=
</m:mathPr></w:WordDocument>=0A=
</xml><![endif]--><!--[if gte mso 9]><xml>=0A=
<w:LatentStyles DefLockedState=3D"false" DefUnhideWhenUsed=3D"true"=0A=
DefSemiHidden=3D"true" DefQFormat=3D"false" DefPriority=3D"99"=0A=
LatentStyleCount=3D"267">=0A=
<w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Normal"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"9" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"heading 1"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 2"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 3"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 4"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 5"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 6"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 7"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 8"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 9"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 1"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 2"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 3"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 4"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 5"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 6"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 7"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 8"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 9"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"35" QFormat=3D"true" Name=3D=
"caption"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"10" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Title"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"1" Name=3D"Default Paragraph=
Font"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"11" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Subtitle"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"22" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Strong"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"20" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Emphasis"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"59" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Table Grid"/>=0A=
<w:LsdException Locked=3D"false" UnhideWhenUsed=3D"false" Name=3D"Placeho=
lder Text"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"1" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"No Spacing"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light Shading"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light List"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light Grid"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium List 1"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium List 2"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Dark List"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful List"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 1"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light List Accent 1"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 1"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 1"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 1"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 1"/>=0A=
<w:LsdException Locked=3D"false" UnhideWhenUsed=3D"false" Name=3D"Revisio=
n"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"34" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"List Paragraph"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"29" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Quote"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"30" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Intense Quote"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 1"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 1"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 1"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 1"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 1"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 1"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 1"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 1"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 2"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light List Accent 2"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 2"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 2"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 2"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 2"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 2"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 2"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 2"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 2"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 2"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 2"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 2"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 2"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 3"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light List Accent 3"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 3"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 3"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 3"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 3"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 3"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 3"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 3"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 3"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 3"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 3"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 3"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 3"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 4"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light List Accent 4"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 4"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 4"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 4"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 4"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 4"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 4"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 4"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 4"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 4"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 4"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 4"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 4"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 5"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light List Accent 5"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 5"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 5"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 5"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 5"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 5"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 5"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 5"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 5"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 5"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 5"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 5"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 5"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 6"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light List Accent 6"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 6"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 6"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 6"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 6"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 6"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 6"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 6"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 6"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 6"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 6"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 6"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 6"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"19" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Subtle Emphasis"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"21" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Intense Emphasis"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"31" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Subtle Reference"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"32" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Intense Reference"/>=
=0A=
<w:LsdException Locked=3D"false" Priority=3D"33" SemiHidden=3D"false"=0A=
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Book Title"/>=0A=
<w:LsdException Locked=3D"false" Priority=3D"37" Name=3D"Bibliography"/>=
=0A=
<w:LsdException Locked=3D"false" Priority=3D"39" QFormat=3D"true" Name=3D=
"TOC Heading"/>=0A=
</w:LatentStyles>=0A=
</xml><![endif]--><!--[if gte mso 10]>=0A=
<style>=0A=
/* Style Definitions */=0A=
table.MsoNormalTable=0A=
{mso-style-name:"Table Normal";=0A=
mso-tstyle-rowband-size:0;=0A=
mso-tstyle-colband-size:0;=0A=
mso-style-noshow:yes;=0A=
mso-style-priority:99;=0A=
mso-style-qformat:yes;=0A=
mso-style-parent:"";=0A=
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;=0A=
mso-para-margin-top:0cm;=0A=
mso-para-margin-right:0cm;=0A=
mso-para-margin-bottom:10.0pt;=0A=
mso-para-margin-left:0cm;=0A=
line-height:115%;=0A=
mso-pagination:widow-orphan;=0A=
font-size:11.0pt;=0A=
font-family:"Calibri","sans-serif";=0A=
mso-ascii-font-family:Calibri;=0A=
mso-ascii-theme-font:minor-latin;=0A=
mso-hansi-font-family:Calibri;=0A=
mso-hansi-theme-font:minor-latin;=0A=
mso-fareast-language:EN-US;}=0A=
</style>=0A=
<![endif]--><!--[if gte mso 9]><xml>=0A=
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026"/>=0A=
</xml><![endif]--><!--[if gte mso 9]><xml>=0A=
<o:shapelayout v:ext=3D"edit">=0A=
<o:idmap v:ext=3D"edit" data=3D"1"/>=0A=
</o:shapelayout></xml><![endif]-->Many
thanks,<br>
Marcel<br>
<br>
<b>[% Begin Unverified Perl </b><br>
<br>
use Inline 'CPP';<br>
<br>
# Script for tasks 2-21 <br>
my $task =3D 9; <br>
my $prevTask =3D $task-1; <br>
<br>
# A. Add the previous choice task to =93observedVector=94 <br>
my @observedVector =3D GETVALUE("observedVector");<br>
push @observedVector, VALUE("task".$prevTask);<br>
SETVALUE("observedVector",join("",@observedVector));<br=
>
<br>
# B. Remove the previous choice task from =93futureVector=94<br>
my @futureVector =3D GETVALUE("futureVector");<br>
splice @futureVector, 0, 10;<br>
<br>
# C. CALL C++ FUNCTION:<br>
# something (approximately) like this:<br>
<b>@futureVector =3D CppAdaptive(@pastVector,@futureVector,$prevTask);</b><=
br>
<br>
# D. Save futureVector and set next choice task<br>
SETVALUE("futureVector",join("",@futureVector));<br>
SETVALUE("task".$task, substr(@futurevector,1,10)); <br>
<br>
__END__<br>
__CPP__<br>
<br>
<pre class=3D"sh_perl sh_sourceCode"><span class=3D"sh_keyword"><b>use</b><=
/span><b> <span class=3D"sh_function">Inline</span> <span class=3D"sh_symbo=
l">(</span>Config <span class=3D"sh_symbol">=3D></span> DIRECTORY <span =
class=3D"sh_symbol">=3D></span> <span class=3D"sh_string">'/usr/local/ap=
ache/Inline'</span><span class=3D"sh_symbol">,</span> </b><span class=3D"sh=
_symbol"><b>);</b></span><code class=3D"perl keyword"><br><b>use</b></code>=
<b><code class=3D"perl string"> Inline Cpp</code> <code class=3D"perl plain=
">=3D> </code><code class=3D"perl string">config</code> <code class=3D"p=
erl plain">=3D> </code><code class=3D"perl string">libs</code> <code cla=
ss=3D"perl plain">=3D> </code><code class=3D"perl string">'-L/your/path =
-lyourlib'</code></b><code class=3D"perl plain"><b>; <br></b></code><code c=
lass=3D"perl plain"></code></pre>
<code class=3D"perl plain"></code><font size=3D"2"><b># pass '-std=3D=
c++11<code></code> -O3 -fopenmp' to the compiler<br>
<br>
</b></font>#include <string><br>
#include "dlib/matrix.h" <br>
using namespace std;<br>
using namespace dlib;<br>
<br>
string<b> </b>CppAdaptive<b>(</b>const string &observedVector, <br>
&nb=
sp; const string &futureVector, <br>
&nb=
sp; const int prevTask<b>)</b> {<br>
<br>
// test dlib matrix module integration <br>
matrix <int> design(12, 6);<br>
design =3D 1, 3, 3, 3, 1, 1,<br>
1,=
3, 1, 3, 1, 3,<br>
1,=
1, 2, 2, 2, 1,<br>
2,=
2, 1, 1, 3, 2,<br>
2,=
3, 2, 1, 1, 3,<br>
3,=
3, 1, 1, 2, 3,<br>
2,=
1, 3, 3, 2, 2,<br>
3,=
1, 3, 2, 2, 2,<br>
3,=
2, 1, 2, 3, 3,<br>
3,=
2, 2, 1, 3, 1,<br>
1,=
2, 3, 2, 1, 2,<br>
2,=
1, 2, 3, 3, 2;<br>
<br>
// return futureVector <br>
return futureVector;<br>
}<br>
<br>
<br>
<b>End Unverified %]</b><br>
</div>
</body>
</html>
--_000_FBA1921A84DC6544B515D072CEA75E689246BCA8stffmb05staffeu_--