UNPKG

bayes-server

Version:

Bayes Server JavaScript API

3 lines 504 kB
'use strict';var __extends=this&&this['__extends']||function(){var c=Object['setPrototypeOf']||{'__proto__':[]}instanceof Array&&function(d,e){d['__proto__']=e;}||function(f,g){for(var h in g)if(g['hasOwnProperty'](h))f[h]=g[h];};return function(i,j){c(i,j);function k(){this['constructor']=i;}i['prototype']=j===null?Object['create'](j):(k['prototype']=j['prototype'],new k());};}();var __values=this&&this['__values']||function(l){var m=typeof Symbol==='function'&&l[Symbol['iterator']],n=0x0;if(m)return m['call'](l);return{'next':function(){if(l&&n>=l['length'])l=void 0x0;return{'value':l&&l[n++],'done':!l};}};};var __read=this&&this['__read']||function(o,p){var q=typeof Symbol==='function'&&o[Symbol['iterator']];if(!q)return o;var r=q['call'](o),s,t=[],u;try{while((p===void 0x0||p-->0x0)&&!(s=r['next']())['done'])t['push'](s['value']);}catch(v){u={'error':v};}finally{try{if(s&&!s['done']&&(q=r['return']))q['call'](r);}finally{if(u)throw u['error'];}}return t;};var __spread=this&&this['__spread']||function(){for(var w=[],x=0x0;x<arguments['length'];x++)w=w['concat'](__read(arguments[x]));return w;};Object['defineProperty'](exports,'__esModule',{'value':!![]});// javascript-obfuscator:disable var sax_1=require('sax');var xmlbuilder=require('xmlbuilder');// javascript-obfuscator:enable var TypeScriptUtils=function(){function y(){}y['isWhiteSpace']=function(z){if(z=='\x20'||z>='09'&&z<='0d'||z=='a0'||z=='85'){return!![];}return![];};y['compareTo']=function(A,B){if(A<B)return-0x1;else if(A>B)return 0x1;else return 0x0;};y['copyFromIterator']=function(C,D){var E=0x0;try{for(var F=__values(C),G=F['next']();!G['done'];G=F['next']()){var H=G['value'];D[E]=H;E++;}}catch(I){J={'error':I};}finally{try{if(G&&!G['done']&&(K=F['return']))K['call'](F);}finally{if(J)throw J['error'];}}var J,K;};y['copyFromList']=function(L,M){var N=0x0;try{for(var O=__values(L),P=O['next']();!P['done'];P=O['next']()){var Q=P['value'];M[N]=Q;N++;}}catch(R){S={'error':R};}finally{try{if(P&&!P['done']&&(T=O['return']))T['call'](O);}finally{if(S)throw S['error'];}}var S,T;};y['isIList']=function(U){if(U===null)return![];return U['_2ad2e5f4b2884a52bf8bfc07ce8953d3']!==undefined;};y['isIDistribution']=function(V){if(V===null)return![];return V['_39d9d5f7317c4bb79bd3c1e43b2b4a43']!==undefined;};y['cloneArray2D']=function(W){var X=y['createArray2D'](W['length']);for(var Y=0x0;Y<W['length'];Y++){var Z=W[Y];X[Y]=Z;if(Z!=null&&Z!=undefined){X[Y]=y['createArray'](Z['length'],null);var a0=X[Y];for(var a1=0x0;a1<Z['length'];a1++){a0[a1]=Z[a1];}}}return X;};y['cloneArray3D']=function(a2){var a3=y['createArray3D'](a2['length']);for(var a4=0x0;a4<a2['length'];a4++){var a5=a2[a4];a3[a4]=a5;if(a5!=null&&a5!=undefined){a3[a4]=y['createArray2D'](a5['length']);var a6=a3[a4];for(var a7=0x0;a7<a5['length'];a7++){var a8=a5[a7];a6[a7]=a8;if(a8!=null&&a8!=undefined){a6[a7]=y['createArray'](a8['length'],null);var a9=a6[a7];for(var aa=0x0;aa<a8['length'];aa++){a9[aa]=a8[aa];}}}}}return a3;};y['arrayClear']=function(ab,ac,ad){var ae=ac+ad;for(var af=ac;af<ae;af++){ab[af]=null;}};y['arrayCopy3']=function(ag,ah,ai){for(var aj=0x0;aj<ai;aj++){ah[aj]=ag[aj];}};y['arrayCopy5']=function(ak,al,am,an,ao){for(var ap=0x0;ap<ao;ap++){am[an+ap]=ak[al+ap];}};y['isInfinity']=function(aq){return aq===Number['POSITIVE_INFINITY']||aq===Number['NEGATIVE_INFINITY'];};y['isNegativeInfinity']=function(ar){return ar===Number['NEGATIVE_INFINITY'];};y['isPositiveInfinity']=function(as){return as===Number['POSITIVE_INFINITY'];};y['pushList']=function(at,au){for(var av=0x0;av<au['length'];av++){at['push'](au[av]);}};y['sealed']=function(aw){Object['seal'](aw);Object['seal'](aw['prototype']);};y['memberwiseClone']=function(ax,ay){Object['assign'](ay,ax);};y['createArray2D']=function(az){var aA=[];for(var aB=az-0x1;aB>=0x0;aB--){aA[aB]=null;}return aA;};y['createArray3D']=function(aC){var aD=[];for(var aE=aC-0x1;aE>=0x0;aE--){aD[aE]=null;}return aD;};y['isNullOrEmpty']=function(aF){if(aF==null)return!![];if(aF===undefined)return!![];if(aF['length']===0x0)return!![];return![];};y['createArray']=function(aG,aH){var aI=new Array(aG);if(aI['length']!=aG)throw new Error('Unexpected\x20error\x20in\x20createArray');for(var aJ=0x0;aJ<aI['length'];aJ++){aI[aJ]=aH;}if(aI['length']!=aG)throw new Error('Unexpected\x20error\x20in\x20createArray');return aI;};return y;}();var VariableId=function(){function aK(aL){this['_Dhb_x_']=null;this['_Dhb_x_']=aL;}aK['prototype']['increment']=function(){return new aK(this['_rqsv_x_'](this['_Dhb_x_'],aK['One']['_Dhb_x_']));};aK['prototype']['_rqsv_x_']=function(aM,aN){if(aM['length']<aN['length']){return this['_rqsv_x_'](aN,aM);}var aO=aM['length'];var aP=aN['length'];var aQ=TypeScriptUtils['createArray'](aO,0x0);var aR=0x0;var aS;for(aS=0x0;aS<aP;aS++){var aT=aM[aS]+aN[aS]+aR;aR=aT>=aK['_Dhc_x_']?0x1:0x0;aQ[aS]=aT-aR*aK['_Dhc_x_'];}while(aS<aO){var aU=aM[aS]+aR;aR=aU===aK['_Dhc_x_']?0x1:0x0;aQ[aS++]=aU-aR*aK['_Dhc_x_'];}if(aR>0x0){if(aS!=aO)throw new Error();aQ[aS]=aR;}return aQ;};aK['prototype']['compareTo']=function(aV){return this['_rqtq_x_'](this['_Dhb_x_'],aV['_Dhb_x_']);};aK['prototype']['_rqtq_x_']=function(aW,aX){if(aW['length']!=aX['length']){return aW['length']>aX['length']?0x1:-0x1;}for(var aY=aW['length']-0x1;aY>=0x0;aY--){if(aW[aY]!=aX[aY]){return aW[aY]>aX[aY]?0x1:-0x1;}}return 0x0;};aK['Zero']=new aK([0x0]);aK['One']=new aK([0x1]);aK['_Dhc_x_']=0x989680;return aK;}();exports['VariableId']=VariableId;var ArcReversal=function(){function aZ(){}aZ['reverse']=function(b0){if(b0==null){throw new ReferenceError('link');}var b1=b0['network'];if(b1==null){throw new Error('link\x20does\x20not\x20belong\x20to\x20a\x20network');}var b2=b0['from'];var b3=b0['to'];var b4=aZ['_r_x_'](b2);var b5=aZ['_r_x_'](b3);if(b5>0x0){if(b2['variables']['size']>0x0&&b4<b2['variables']['size']){throw new Error('Reversing\x20the\x20link\x20would\x20result\x20in\x20a\x20node\x20with\x20continuous\x20variables,\x20linking\x20to\x20a\x20child\x20with\x20discrete\x20variables,\x20which\x20is\x20not\x20supported.');}}aZ['_q_x_'](b2);aZ['_q_x_'](b3);var b6=new Set();aZ['_s_x_'](b2,b6);aZ['_s_x_'](b3,b6);var b7=new Set();var b8=new Set();try{for(var b9=__values(b2['linksIn']),ba=b9['next']();!ba['done'];ba=b9['next']()){var bb=ba['value'];aZ['_q_x_'](bb['from']);!b7['has'](bb['from'])&&b7['add'](bb['from']);aZ['_s_x_'](bb['from'],b6);}}catch(bc){bH={'error':bc};}finally{try{if(ba&&!ba['done']&&(bI=b9['return']))bI['call'](b9);}finally{if(bH)throw bH['error'];}}try{for(var bd=__values(b3['linksIn']),be=bd['next']();!be['done'];be=bd['next']()){var bf=be['value'];aZ['_q_x_'](bf['from']);!b8['has'](bf['from'])&&b8['add'](bf['from']);aZ['_s_x_'](bf['from'],b6);}}catch(bg){bJ={'error':bg};}finally{try{if(be&&!be['done']&&(bK=bd['return']))bK['call'](bd);}finally{if(bJ)throw bJ['error'];}}var bh=new Set();var bi=new Set();!bh['has'](b3)&&bh['add'](b3);try{for(var bj=__values(b2['linksIn']),bk=bj['next']();!bk['done'];bk=bj['next']()){var bl=bk['value'];if(!b8['has'](bl['from'])){!bi['has'](bl['from'])&&bi['add'](bl['from']);}}}catch(bm){bL={'error':bm};}finally{try{if(bk&&!bk['done']&&(bM=bj['return']))bM['call'](bj);}finally{if(bL)throw bL['error'];}}try{for(var bn=__values(b3['linksIn']),bo=bn['next']();!bo['done'];bo=bn['next']()){var bp=bo['value'];if(bp['from']===b2){continue;}if(!b7['has'](bp['from'])){!bh['has'](bp['from'])&&bh['add'](bp['from']);}}}catch(bq){bN={'error':bq};}finally{try{if(bo&&!bo['done']&&(bO=bn['return']))bO['call'](bn);}finally{if(bN)throw bN['error'];}}var br=b2['distribution']['multiply'](b3['distribution']);var bs=new List();try{for(var bt=__values(bh),bu=bt['next']();!bu['done'];bu=bt['next']()){var bv=bu['value'];if(bv===b3){bs['push'](b0['copy'](bv,b2,b0['temporalOrder']));}else{bs['push'](new Link(bv,b2));}}}catch(bw){bP={'error':bw};}finally{try{if(bu&&!bu['done']&&(bQ=bt['return']))bQ['call'](bt);}finally{if(bP)throw bP['error'];}}try{for(var bx=__values(bi),by=bx['next']();!by['done'];by=bx['next']()){var bz=by['value'];bs['push'](new Link(bz,b3));}}catch(bA){bR={'error':bA};}finally{try{if(by&&!by['done']&&(bS=bx['return']))bS['call'](bx);}finally{if(bR)throw bR['error'];}}if(!Dag['isDag'](b1,new ArrayList([b0]),bs)){throw new Error('Reversing\x20the\x20link\x20would\x20create\x20a\x20network\x20that\x20is\x20not\x20a\x20directed\x20acyclic\x20graph\x20(DAG).');}b1['links']['remove'](b0);try{for(var bB=__values(bs),bC=bB['next']();!bC['done'];bC=bB['next']()){var bD=bC['value'];b1['links']['push'](bD);}}catch(bE){bT={'error':bE};}finally{try{if(bC&&!bC['done']&&(bU=bB['return']))bU['call'](bB);}finally{if(bT)throw bT['error'];}}var bF=b3['newDistribution']();bF['marginalize'](br);b3['distribution']=bF;var bG=br['divide'](bF);bG['table']['normalize'](!![]);b2['distribution']=bG;var bH,bI,bJ,bK,bL,bM,bN,bO,bP,bQ,bR,bS,bT,bU;};aZ['_q_x_']=function(bV){if(bV['distributionOptions']['noisyType']!=NoisyType['None']){throw new Error('Arc\x20reversal\x20with\x20noisy\x20nodes\x20is\x20not\x20supported.');}try{for(var bW=__values(bV['distributions']),bX=bW['next']();!bX['done'];bX=bW['next']()){var bY=bX['value'];if(bY[0x1]==null){throw new Error('Link\x20reversal\x20is\x20only\x20supported\x20when\x20the\x20nodes\x20involved\x20in\x20the\x20reversal\x20process\x20have\x20distributions\x20specified.');}}}catch(bZ){c0={'error':bZ};}finally{try{if(bX&&!bX['done']&&(c1=bW['return']))c1['call'](bW);}finally{if(c0)throw c0['error'];}}var c0,c1;};aZ['_r_x_']=function(c2){var c3=0x0;try{for(var c4=__values(c2['variables']),c5=c4['next']();!c5['done'];c5=c4['next']()){var c6=c5['value'];if(c6['valueType']===VariableValueType['Continuous']){c3++;}}}catch(c7){c8={'error':c7};}finally{try{if(c5&&!c5['done']&&(c9=c4['return']))c9['call'](c4);}finally{if(c8)throw c8['error'];}}return c3;var c8,c9;};aZ['_s_x_']=function(ca,cb){var cc=ca['temporalType'];if(cc!=TemporalType['Contemporal']&&cc!=TemporalType['Initial']){throw new Error('Arc\x20reversal\x20only\x20supported\x20for\x20contemporal\x20and\x20initial\x20nodes');}try{for(var cd=__values(ca['variables']),ce=cd['next']();!ce['done'];ce=cd['next']()){var cf=ce['value'];!cb['has'](cf)&&cb['add'](cf);}}catch(cg){ch={'error':cg};}finally{try{if(ce&&!ce['done']&&(ci=cd['return']))ci['call'](cd);}finally{if(ch)throw ch['error'];}}var ch,ci;};return aZ;}();exports['ArcReversal']=ArcReversal;var Bounds=function(){function cj(ck,cl,cm,cn){this['_A_x_']=0x0;this['_B_x_']=0x0;this['_C_x_']=0x0;this['_D_x_']=0x0;this['_A_x_']=ck;this['_B_x_']=cl;this['_C_x_']=cm;this['_D_x_']=cn;}Object['defineProperty'](cj['prototype'],'x',{'get':function(){return this['_A_x_'];},'enumerable':!![],'configurable':!![]});Object['defineProperty'](cj['prototype'],'y',{'get':function(){return this['_B_x_'];},'enumerable':!![],'configurable':!![]});Object['defineProperty'](cj['prototype'],'width',{'get':function(){return this['_C_x_'];},'enumerable':!![],'configurable':!![]});Object['defineProperty'](cj['prototype'],'height',{'get':function(){return this['_D_x_'];},'enumerable':!![],'configurable':!![]});return cj;}();exports['Bounds']=Bounds;var Cancellation=function(){function co(){this['cancel_AUTO_GENERATED']=![];}Object['defineProperty'](co['prototype'],'cancel',{'get':function(){return this['cancel_AUTO_GENERATED'];},'set':function(cp){this['cancel_AUTO_GENERATED']=cp;},'enumerable':!![],'configurable':!![]});return co;}();exports['Cancellation']=Cancellation;var CLGaussian=function(){function cq(cr,cs,ct){this['_39d9d5f7317c4bb79bd3c1e43b2b4a43']=null;this['_E_x_']=null;this['_Bd_x_']=0x0;this['_Be_x_']=0x0;this['_Bf_x_']=null;this['_Bg_x_']=null;this['_Bh_x_']=null;this['_Ca_x_']=null;this['_Cb_x_']=null;this['_Cc_x_']=![];this['_Cd_x_']=0x0;this['_Ce_x_']=null;this['_Cf_x_']=null;this['_Cg_x_']=null;if(ct!==undefined){if(cr instanceof Array&&typeof cs==='number'){this['_cons_autogen4'](cr,cs,ct);}else if(TypeScriptUtils['isIList'](cr)&&(cs==null||typeof cs==='number')){this['_cons_autogen8'](cr,cs,ct);}else{throw new Error('Invalid\x20constructor\x20arguments.');}}else if(cs!==undefined){if(cr instanceof Array&&typeof cs==='number'){this['_cons_autogen3'](cr,cs);}else if(cr instanceof Node&&(cs==null||typeof cs==='number')){this['_cons_autogen5'](cr,cs);}else if(cr instanceof Variable&&(cs==null||typeof cs==='number')){this['_cons_autogen14'](cr,cs);}else if(cr instanceof cq&&(cs==null||typeof cs==='number')){this['_cons_autogen16'](cr,cs);}else if(TypeScriptUtils['isIList'](cr)&&cs instanceof HeadTail){var cu=cr;if(cu['size']>0x0){if(cu['get'](0x0)instanceof VariableContext){this['_cons_autogen2'](cr,cs);}else if(cu['get'](0x0)instanceof Variable){var cv=cr;var cw=cs;this['_cons_autogen8'](cv,null,cw);this['_cons_autogen7'](cr,cs);}else{throw new Error('Array\x20element\x20type\x20not\x20recognized.');}}else{this['_cons_autogen2'](cr,cs);}}else if(TypeScriptUtils['isIList'](cr)&&(cs==null||typeof cs==='number')){var cv=cr;var cy=cs;this['_cons_autogen8'](cv,cy,HeadTail['Head']);this['_cons_autogen6'](cr,cs);}else{throw new Error('Invalid\x20constructor\x20arguments.');}}else if(cr!==undefined){if(cr instanceof Array){var cu=cr;if(cu['length']>0x0){if(cu[0x0]instanceof VariableContext){var cA=cr;this['_cons_autogen1'](new ArrayList(cA));this['_cons_autogen0'](cr);}else if(cu[0x0]instanceof Variable){var cv=cr;this['_cons_autogen8'](new ArrayList(cv),null,HeadTail['Head']);this['_cons_autogen10'](cr);}else{throw new Error('Array\x20element\x20type\x20not\x20recognized.');}}else{var cA=cr;this['_cons_autogen1'](new ArrayList(cA));this['_cons_autogen0'](cr);}}else if(cr instanceof Node){var cD=cr;this['_cons_autogen8'](cD['variables'],null,HeadTail['Head']);this['_cons_autogen11'](cr);}else if(cr instanceof Variable){var cE=cr;this['_cons_autogen8'](new ArrayList([cE]),null,HeadTail['Head']);this['_cons_autogen12'](cr);}else if(cr instanceof VariableContext){this['_cons_autogen13'](cr);}else if(cr instanceof cq){var cF=cr;this['_cons_autogen16'](cF,null);this['_cons_autogen15'](cr);}else if(TypeScriptUtils['isIList'](cr)){var cu=cr;if(cu['size']>0x0){if(cu['get'](0x0)instanceof VariableContext){this['_cons_autogen1'](cr);}else if(cu['get'](0x0)instanceof Variable){var cv=cr;this['_cons_autogen8'](cv,null,HeadTail['Head']);this['_cons_autogen9'](cr);}else{throw new Error('Array\x20element\x20type\x20not\x20recognized.');}}else{this['_cons_autogen1'](cr);}}else{throw new Error('Invalid\x20constructor\x20arguments.');}}else{throw new Error('Invalid\x20constructor\x20arguments.');}}cq['prototype']['_cons_autogen0']=function(cI){};cq['prototype']['_cons_autogen1']=function(cJ){if(cJ==null){throw new ReferenceError('variableContexts');}var cK=cJ['size'];var cL=TypeScriptUtils['createArray'](cK,null);var cM=0x0;var cN=0x0;var cO=0x0;for(var cP=0x0;cP<cK;cP++){var cQ=cJ['get'](cP);cL[cP]=new VariableContext(cQ);if(cQ['variable']['valueType']===VariableValueType['Discrete']){cM++;}else{if(cQ['headTail']===HeadTail['Head']){cN++;}else{cO++;}}}this['_t_x_'](cL,cM,cN,cO);};cq['prototype']['_cons_autogen2']=function(cR,cS){if(cR==null)throw new ReferenceError('variableContexts');var cT=cR['size'];var cU=TypeScriptUtils['createArray'](cT,null);var cV=0x0;var cW=0x0;var cX=0x0;for(var cY=0x0;cY<cT;cY++){var cZ=cR['get'](cY);cU[cY]=new VariableContext(cZ['variable'],cZ['time'],cS);if(cZ['variable']['valueType']===VariableValueType['Discrete']){cV++;}else{if(cS===HeadTail['Head']){cW++;}else{cX++;}}}this['_t_x_'](cU,cV,cW,cX);};cq['prototype']['_cons_autogen3']=function(d0,d1){if(d0==null)throw new ReferenceError('variableContexts');if(d1<0x0)throw new RangeError('count'+':\x20'+'Value\x20must\x20be\x20non\x20negative.');if(d1>d0['length'])throw new RangeError('count'+':\x20'+'Value\x20cannot\x20be\x20greater\x20than\x20the\x20length\x20of\x20variableContexts');var d2=TypeScriptUtils['createArray'](d1,null);var d3=0x0;var d4=0x0;var d5=0x0;for(var d6=0x0;d6<d1;d6++){var d7=d0[d6];d2[d6]=new VariableContext(d7);if(d7['variable']['valueType']===VariableValueType['Discrete']){d3++;}else{if(d7['headTail']===HeadTail['Head']){d4++;}else{d5++;}}}this['_t_x_'](d2,d3,d4,d5);};cq['prototype']['_cons_autogen4']=function(d8,d9,da){if(d8==null)throw new ReferenceError('variableContexts');if(d9<0x0)throw new RangeError('count'+':\x20'+'Value\x20must\x20be\x20non\x20negative.');if(d9>d8['length'])throw new RangeError('count'+':\x20'+'Value\x20cannot\x20be\x20greater\x20than\x20the\x20length\x20of\x20variableContexts');var db=TypeScriptUtils['createArray'](d9,null);var dc=0x0;var dd=0x0;var de=0x0;for(var df=0x0;df<d9;df++){var dg=d8[df];db[df]=new VariableContext(dg['variable'],dg['time'],da);if(dg['variable']['valueType']===VariableValueType['Discrete']){dc++;}else{if(da===HeadTail['Head']){dd++;}else{de++;}}}this['_t_x_'](db,dc,dd,de);};cq['prototype']['_cons_autogen5']=function(dh,di){if(dh==null)throw new ReferenceError('node');var dj=TypeScriptUtils['createArray'](dh['variables']['size'],null);var dk=0x0;var dl=0x0;var dm=0x0;for(var dn=0x0;dn<dj['length'];dn++){var dp=new VariableContext(dh['variables']['get'](dn),di,HeadTail['Head']);dj[dn]=dp;if(dp['variable']['valueType']===VariableValueType['Discrete']){dk++;}else{dl++;}}this['_t_x_'](dj,dk,dl,dm);};cq['prototype']['_cons_autogen6']=function(dq,dr){};cq['prototype']['_cons_autogen7']=function(ds,dt){};cq['prototype']['_cons_autogen8']=function(du,dv,dw){if(du==null)throw new ReferenceError('variables');var dx=du['size'];var dy=TypeScriptUtils['createArray'](dx,null);var dz=0x0;var dA=0x0;var dB=0x0;for(var dC=0x0;dC<dx;dC++){var dD=du['get'](dC);if(dD==null){throw new Error('variables\x20cannot\x20be\x20null.');}var dE=dv;if(dD['node']!=null){dE=dD['node']['temporalType']===TemporalType['Temporal']?dv:null;}var dF=new VariableContext(dD,dE,dw);dy[dC]=dF;if(dF['variable']['valueType']===VariableValueType['Discrete']){dz++;}else{if(dF['headTail']===HeadTail['Head']){dA++;}else{dB++;}}}this['_t_x_'](dy,dz,dA,dB);};cq['prototype']['_cons_autogen9']=function(dG){};cq['prototype']['_cons_autogen10']=function(dH){};cq['prototype']['_cons_autogen11']=function(dI){};cq['prototype']['_cons_autogen12']=function(dJ){};cq['prototype']['_cons_autogen13']=function(dK){if(dK==null)throw new ReferenceError('variableContext');var dL=0x0;var dM=0x0;var dN=0x0;if(dK['variable']['valueType']===VariableValueType['Discrete']){dL++;}else{if(dK['headTail']===HeadTail['Head']){dM++;}else{dN++;}}this['_t_x_']([new VariableContext(dK)],dL,dM,dN);};cq['prototype']['_cons_autogen14']=function(dO,dP){if(dO==null)throw new ReferenceError('variable');var dQ=dO['valueType']===VariableValueType['Discrete']?0x1:0x0;var dR=dQ===0x0?0x1:0x0;this['_t_x_']([new VariableContext(dO,dP,HeadTail['Head'])],dQ,dR,0x0);};cq['prototype']['_cons_autogen15']=function(dS){};cq['prototype']['_cons_autogen16']=function(dT,dU){if(dT==null)throw new ReferenceError('source');var dV=TypeScriptUtils['createArray'](dT['_Ce_x_']['size'],null);for(var dW=0x0;dW<dV['length'];dW++){var dX=dT['_Ce_x_']['get'](dW);if(dU==null){dV[dW]=new VariableContext(dX);}else{var dY=dX['time'];if(dY!=null)dY+=dU;dV[dW]=new VariableContext(dX['variable'],dY,dX['headTail']);}}this['_t_x_'](dV,dT['_E_x_']['sortedVariables']['size'],dT['_Bd_x_'],dT['_Be_x_']);dT['table']['copyTo'](this['_E_x_']);if(dT['_Bh_x_']!=null){this['_Bh_x_']=TypeScriptUtils['createArray'](dT['_Bh_x_']['length'],null);TypeScriptUtils['arrayCopy5'](dT['_Bh_x_'],0x0,this['_Bh_x_'],0x0,dT['_Bh_x_']['length']);}if(dT['_Bf_x_']!=null){cq['_rq_x_'](dT['_Bf_x_'],this['_Bf_x_']);}if(dT['_Bg_x_']!=null){for(var dZ=0x0;dZ<this['_Bg_x_']['length'];dZ++){cq['_rq_x_'](dT['_Bg_x_'][dZ],this['_Bg_x_'][dZ]);}}if(dT['_Ca_x_']!=null){for(var e0=0x0;e0<this['_Ca_x_']['length'];e0++){cq['_rq_x_'](dT['_Ca_x_'][e0],this['_Ca_x_'][e0]);}}};cq['prototype']['toString']=function(){return Xww_x_['rss_x_'](this,![]);};cq['prototype']['reset']=function(){this['_rr_x_']();var e1=this['_Cf_x_']['size'];var e2=this['_Cg_x_']['size'];this['_Bh_x_']=null;for(var e3=0x0;e3<this['_Cd_x_'];e3++){for(var e4=0x0;e4<e1;e4++){this['_Bf_x_'][e3][e4]=0x0;for(var e5=e4;e5<e1;e5++){this['_Bg_x_'][e3][e5][e4]=0x0;}for(var e6=0x0;e6<e2;e6++){this['_Ca_x_'][e3][e4][e6]=0x0;}}}};cq['prototype']['_t_x_']=function(e7,e8,e9,ea){Xyxy_x_['rqsu_x_'](e7);var eb=TypeScriptUtils['createArray'](e8,null);var ec=TypeScriptUtils['createArray'](e9,null);var ed=TypeScriptUtils['createArray'](ea,null);var ee=0x0;var ef=0x0;var eg=0x0;for(var eh=0x0;eh<e7['length'];eh++){var ei=e7[eh];if(ei['variable']['valueType']===VariableValueType['Discrete']){eb[ee++]=ei;}else{if(ei['isHead']()){ec[ef++]=ei;}else{ed[eg++]=ei;}}}this['_E_x_']=new Table(eb,![]);this['_E_x_']['_vru_x_'](this);this['_Cd_x_']=this['_E_x_']['size'];this['_Bd_x_']=ec['length'];this['_Be_x_']=ed['length'];var ej=eb['length'];this['_Cf_x_']=new VariableContextCollection(ec,![]);this['_Cg_x_']=new VariableContextCollection(ed,![]);this['_Ce_x_']=new VariableContextCollection(e7,![]);if(this['_Bd_x_']>0x0){this['_Bf_x_']=TypeScriptUtils['createArray2D'](this['_Cd_x_']);this['_Bg_x_']=TypeScriptUtils['createArray3D'](this['_Cd_x_']);}if(this['_Be_x_']>0x0){this['_Ca_x_']=TypeScriptUtils['createArray3D'](this['_Cd_x_']);}for(var ek=0x0;ek<this['_Cd_x_'];ek++){if(this['_Bd_x_']>0x0){this['_Bf_x_'][ek]=TypeScriptUtils['createArray'](this['_Bd_x_'],0x0);this['_Bg_x_'][ek]=TypeScriptUtils['createArray2D'](this['_Bd_x_']);}if(this['_Be_x_']>0x0&&this['_Bd_x_']>0x0){this['_Ca_x_'][ek]=TypeScriptUtils['createArray2D'](this['_Bd_x_']);}for(var el=0x0;el<this['_Bd_x_'];el++){this['_Bg_x_'][ek][el]=TypeScriptUtils['createArray'](el+0x1,0x0);if(this['_Be_x_']>0x0){this['_Ca_x_'][ek][el]=this['_Be_x_']>0x0?TypeScriptUtils['createArray'](this['_Be_x_'],0x0):cq['_Ch_x_'];}}}};cq['prototype']['timeShift']=function(em){this['_rr_x_']();this['_Ce_x_']['_rqss_x_'](em);this['_E_x_']['sortedVariables']['_rqss_x_'](em);this['_Cf_x_']['_rqss_x_'](em);this['_Cg_x_']['_rqss_x_'](em);for(var en=0x0;en<this['_Ce_x_']['size'];en++){var eo=this['_Ce_x_']['get'](en);if(eo['time']!=null){eo['_setTime'](eo['time']+em);}}};cq['prototype']['_u_x_']=function(ep){if(ep==null)throw new ReferenceError('variableContexts');if(this['_Bd_x_']<=ep['size'])throw new Error('Superset\x20head\x20count\x20is\x20less\x20than\x20or\x20equal\x20to\x20the\x20variables\x20count.');if(!this['_Cf_x_']['includesAll'](ep,!![]))throw new Error('Distribution\x20head\x20does\x20not\x20contain\x20all\x20variables\x20at\x20times\x20specified.');var eq=new List(ep);eq['pushList'](this['_Cg_x_']);eq['pushList'](this['_E_x_']['sortedVariables']);var er=new cq(eq);var es=er['_Cf_x_'];var et=es['size'];var eu=TypeScriptUtils['createArray'](et,0x0);for(var ev=0x0;ev<et;ev++){eu[ev]=this['_Cf_x_']['indexOf'](es['get'](ev),!![]);}this['_E_x_']['copyTo'](er['_E_x_']);if(et>0x0){for(var ew=0x0;ew<this['_Cd_x_'];ew++){var ex=er['_Bf_x_'][ew];var ey=this['_Bf_x_'][ew];for(var ez=0x0;ez<et;ez++){var eA=eu[ez];ex[ez]=ey[eA];var eB=this['_Bg_x_'][ew][eA];var eC=er['_Bg_x_'][ew][ez];for(var eD=0x0;eD<=ez;eD++){eC[eD]=eB[eu[eD]];}if(this['_Be_x_']>0x0){var eE=er['_Ca_x_'][ew][ez];var eF=this['_Ca_x_'][ew][eA];for(var eG=0x0;eG<this['_Be_x_'];eG++){eE[eG]=eF[eG];}}}}}return er;};Object['defineProperty'](cq['prototype'],'locked',{'get':function(){return this['_Cc_x_'];},'set':function(eH){this['_Cc_x_']=eH;this['_E_x_']['locked']=eH;},'enumerable':!![],'configurable':!![]});cq['prototype']['isReadOnly']=function(){if(this['_Cb_x_']!=null)return!![];if(this['_Cc_x_'])return!![];return![];};cq['prototype']['copy']=function(eI){if(eI!==undefined){return this['_Copy_autogen1'](eI);}else{return this['_Copy_autogen0']();}};cq['prototype']['_Copy_autogen0']=function(){return new cq(this);};cq['prototype']['_Copy_autogen1']=function(eJ){return new cq(this,eJ);};cq['prototype']['_rr_x_']=function(){if(this['_Cb_x_']!=null)throw new Error('Distribution\x20cannot\x20be\x20changed\x20while\x20assigned\x20to\x20node\x20['+this['_Cb_x_']['index']+'].');if(this['_Cc_x_'])throw new Error('The\x20distribution\x20is\x20currently\x20locked\x20and\x20therefore\x20cannot\x20be\x20modified.');};cq['prototype']['getMean']=function(eK,eL,eM){if(eM!==undefined){if(eM instanceof Array){var eN=eM;if(eN['length']>0x0){if(eN[0x0]instanceof State){return this['_GetMean_autogen4'](eK,eL,eM);}else if(eN[0x0]instanceof StateContext){return this['_GetMean_autogen7'](eK,eL,eM);}else{throw new Error('Array\x20element\x20type\x20not\x20recognized.');}}else{return this['_GetMean_autogen7'](eK,eL,eM);}}else if(eM instanceof TableIterator){return this['_GetMean_autogen10'](eK,eL,eM);}else{throw new Error('Invalid\x20method\x20arguments.');}}else if(eL!==undefined){if(eK instanceof Variable&&eL instanceof Array){var eN=eL;if(eN['length']>0x0){if(eN[0x0]instanceof State){return this['_GetMean_autogen1'](eK,eL);}else if(eN[0x0]instanceof StateContext){return this['_GetMean_autogen6'](eK,eL);}else{throw new Error('Array\x20element\x20type\x20not\x20recognized.');}}else{return this['_GetMean_autogen6'](eK,eL);}}else if(eK instanceof VariableContext&&eL instanceof Array){var eN=eL;if(eN['length']>0x0){if(eN[0x0]instanceof State){return this['_GetMean_autogen5'](eK,eL);}else if(eN[0x0]instanceof StateContext){return this['_GetMean_autogen8'](eK,eL);}else{throw new Error('Array\x20element\x20type\x20not\x20recognized.');}}else{return this['_GetMean_autogen8'](eK,eL);}}else if(eK instanceof Variable&&eL instanceof TableIterator){return this['_GetMean_autogen9'](eK,eL);}else if(eK instanceof VariableContext&&eL instanceof TableIterator){return this['_GetMean_autogen11'](eK,eL);}else if(eK instanceof Variable&&(eL==null||typeof eL==='number')){return this['_GetMean_autogen3'](eK,eL);}else if(typeof eK==='number'&&typeof eL==='number'){return this['_GetMean_autogen0'](eK,eL);}else{throw new Error('Invalid\x20method\x20arguments.');}}else if(eK!==undefined){return this['_GetMean_autogen2'](eK);}else{throw new Error('Invalid\x20method\x20arguments.');}};cq['prototype']['_GetMean_autogen0']=function(eQ,eR){return this['_rs_x_'](eQ,eR);};cq['prototype']['_GetMean_autogen1']=function(eS,eT){return this['getMean'](eS,null,eT);};cq['prototype']['_GetMean_autogen2']=function(eU){if(this['_E_x_']['size']!=0x1)throw new Error('This\x20overload\x20of\x20GetMean\x20can\x20only\x20be\x20called\x20when\x20the\x20distribution\x20does\x20not\x20contain\x20any\x20discrete\x20variables.');return this['getMean'](eU,null,cq['_Da_x_']);};cq['prototype']['_GetMean_autogen3']=function(eV,eW){if(this['_E_x_']['size']!=0x1)throw new Error('This\x20overload\x20of\x20GetMean\x20can\x20only\x20be\x20called\x20when\x20the\x20distribution\x20does\x20not\x20contain\x20any\x20discrete\x20variables.');return this['getMean'](eV,eW,cq['_Da_x_']);};cq['prototype']['_GetMean_autogen4']=function(eX,eY,eZ){if(eX==null)throw new ReferenceError('continuousHead');var f0=this['_Cf_x_']['indexOf'](eX,eY);return this['_Bf_x_'][this['_E_x_']['getSortedIndex'](eZ)][f0];};cq['prototype']['_GetMean_autogen5']=function(f1,f2){if(f1==null)throw new ReferenceError('continuousHead');if(f1['headTail']!=HeadTail['Head'])throw new Error('continuousHead\x20is\x20not\x20Head');return this['getMean'](f1['variable'],f1['time'],f2);};cq['prototype']['_GetMean_autogen6']=function(f3,f4){return this['getMean'](f3,null,f4);};cq['prototype']['_GetMean_autogen7']=function(f5,f6,f7){if(f5==null)throw new ReferenceError('continuousHead');var f8=this['_Cf_x_']['indexOf'](f5,f6);return this['_Bf_x_'][this['_E_x_']['getSortedIndex'](f7)][f8];};cq['prototype']['_GetMean_autogen8']=function(f9,fa){if(f9==null)throw new ReferenceError('continuousHead');if(f9['headTail']!=HeadTail['Head'])throw new Error('continuousHead\x20is\x20not\x20Head');return this['getMean'](f9['variable'],f9['time'],fa);};cq['prototype']['_GetMean_autogen9']=function(fb,fc){return this['getMean'](fb,null,fc);};cq['prototype']['_GetMean_autogen10']=function(fd,fe,ff){if(fd==null)throw new ReferenceError('continuousHead');if(ff==null)throw new ReferenceError('iterator');if(ff['table']!=this['table'])throw new Error('TableIterator.Table\x20does\x20not\x20refer\x20to\x20this\x20instance.');var fg=this['_Cf_x_']['indexOf'](fd,fe);return this['_Bf_x_'][ff['tableRow']][fg];};cq['prototype']['_GetMean_autogen11']=function(fh,fi){if(fh==null)throw new ReferenceError('continuousHead');if(fh['headTail']!=HeadTail['Head'])throw new Error('variable\x20context\x20is\x20not\x20Head');return this['getMean'](fh['variable'],fh['time'],fi);};cq['prototype']['_rs_x_']=function(fj,fk){return this['_Bf_x_'][fj][fk];};cq['prototype']['getVariance']=function(fl,fm,fn){if(fn!==undefined){if(fn instanceof Array){var fo=fn;if(fo['length']>0x0){if(fo[0x0]instanceof State){return this['_GetVariance_autogen4'](fl,fm,fn);}else if(fo[0x0]instanceof StateContext){return this['_GetVariance_autogen7'](fl,fm,fn);}else{throw new Error('Array\x20element\x20type\x20not\x20recognized.');}}else{return this['_GetVariance_autogen7'](fl,fm,fn);}}else if(fn instanceof TableIterator){return this['_GetVariance_autogen10'](fl,fm,fn);}else{throw new Error('Invalid\x20method\x20arguments.');}}else if(fm!==undefined){if(fl instanceof Variable&&fm instanceof Array){var fo=fm;if(fo['length']>0x0){if(fo[0x0]instanceof State){return this['_GetVariance_autogen1'](fl,fm);}else if(fo[0x0]instanceof StateContext){return this['_GetVariance_autogen6'](fl,fm);}else{throw new Error('Array\x20element\x20type\x20not\x20recognized.');}}else{return this['_GetVariance_autogen6'](fl,fm);}}else if(fl instanceof VariableContext&&fm instanceof Array){var fo=fm;if(fo['length']>0x0){if(fo[0x0]instanceof State){return this['_GetVariance_autogen5'](fl,fm);}else if(fo[0x0]instanceof StateContext){return this['_GetVariance_autogen8'](fl,fm);}else{throw new Error('Array\x20element\x20type\x20not\x20recognized.');}}else{return this['_GetVariance_autogen8'](fl,fm);}}else if(fl instanceof Variable&&fm instanceof TableIterator){return this['_GetVariance_autogen9'](fl,fm);}else if(fl instanceof VariableContext&&fm instanceof TableIterator){return this['_GetVariance_autogen11'](fl,fm);}else if(fl instanceof Variable&&(fm==null||typeof fm==='number')){return this['_GetVariance_autogen3'](fl,fm);}else if(typeof fl==='number'&&typeof fm==='number'){return this['_GetVariance_autogen0'](fl,fm);}else{throw new Error('Invalid\x20method\x20arguments.');}}else if(fl!==undefined){return this['_GetVariance_autogen2'](fl);}else{throw new Error('Invalid\x20method\x20arguments.');}};cq['prototype']['_GetVariance_autogen0']=function(fr,fs){return this['_rt_x_'](fr,fs);};cq['prototype']['_GetVariance_autogen1']=function(ft,fu){return this['getVariance'](ft,null,fu);};cq['prototype']['_GetVariance_autogen2']=function(fv){if(this['_E_x_']['size']!=0x1)throw new Error('This\x20overload\x20of\x20GetVariance\x20can\x20only\x20be\x20called\x20when\x20the\x20distribution\x20does\x20not\x20contain\x20any\x20discrete\x20variables.');return this['getVariance'](fv,null,cq['_Da_x_']);};cq['prototype']['_GetVariance_autogen3']=function(fw,fx){if(this['_E_x_']['size']!=0x1)throw new Error('This\x20overload\x20of\x20GetVariance\x20can\x20only\x20be\x20called\x20when\x20the\x20distribution\x20does\x20not\x20contain\x20any\x20discrete\x20variables.');return this['getVariance'](fw,fx,cq['_Da_x_']);};cq['prototype']['_GetVariance_autogen4']=function(fy,fz,fA){if(fy==null)throw new ReferenceError('continuousHead');var fB=this['_Cf_x_']['indexOf'](fy,fz);return this['_Bg_x_'][this['_E_x_']['getSortedIndex'](fA)][fB][fB];};cq['prototype']['_GetVariance_autogen5']=function(fC,fD){if(fC==null)throw new ReferenceError('continuousHead');if(fC['headTail']!=HeadTail['Head'])throw new Error('continuousHead\x20is\x20not\x20Head');return this['getVariance'](fC['variable'],fC['time'],fD);};cq['prototype']['_GetVariance_autogen6']=function(fE,fF){return this['getVariance'](fE,null,fF);};cq['prototype']['_GetVariance_autogen7']=function(fG,fH,fI){if(fG==null)throw new ReferenceError('continuousHead');var fJ=this['_Cf_x_']['indexOf'](fG,fH);return this['_Bg_x_'][this['_E_x_']['getSortedIndex'](fI)][fJ][fJ];};cq['prototype']['_GetVariance_autogen8']=function(fK,fL){if(fK==null)throw new ReferenceError('continuousHead');if(fK['headTail']!=HeadTail['Head'])throw new Error('continuousHead\x20is\x20not\x20Head');return this['getVariance'](fK['variable'],fK['time'],fL);};cq['prototype']['_GetVariance_autogen9']=function(fM,fN){return this['getVariance'](fM,null,fN);};cq['prototype']['_GetVariance_autogen10']=function(fO,fP,fQ){if(fO==null)throw new ReferenceError('continuousHead');if(fQ==null)throw new ReferenceError('iterator');if(fQ['table']!=this['table'])throw new Error('TableIterator.Table\x20does\x20not\x20refer\x20to\x20this\x20instance.');var fR=this['_Cf_x_']['indexOf'](fO,fP);return this['_Bg_x_'][fQ['tableRow']][fR][fR];};cq['prototype']['_GetVariance_autogen11']=function(fS,fT){if(fS==null)throw new ReferenceError('continuousHead');if(fS['headTail']!=HeadTail['Head'])throw new Error('continuousHead\x20is\x20not\x20Head');return this['getVariance'](fS['variable'],fS['time'],fT);};cq['prototype']['_rt_x_']=function(fU,fV){return this['_Bg_x_'][fU][fV][fV];};cq['prototype']['getCovariance']=function(fW,fX,fY,fZ,g0){if(g0!==undefined){if(g0 instanceof Array){var g1=g0;if(g1['length']>0x0){if(g1[0x0]instanceof State){return this['_GetCovariance_autogen5'](fW,fX,fY,fZ,g0);}else if(g1[0x0]instanceof StateContext){return this['_GetCovariance_autogen6'](fW,fX,fY,fZ,g0);}else{throw new Error('Array\x20element\x20type\x20not\x20recognized.');}}else{return this['_GetCovariance_autogen6'](fW,fX,fY,fZ,g0);}}else if(g0 instanceof TableIterator){return this['_GetCovariance_autogen10'](fW,fX,fY,fZ,g0);}else{throw new Error('Invalid\x20method\x20arguments.');}}else if(fZ!==undefined){return this['_GetCovariance_autogen3'](fW,fX,fY,fZ);}else if(fY!==undefined){if(fW instanceof Variable&&fX instanceof Variable&&fY instanceof Array){var g1=fY;if(g1['length']>0x0){if(g1[0x0]instanceof State){return this['_GetCovariance_autogen1'](fW,fX,fY);}else if(g1[0x0]instanceof StateContext){return this['_GetCovariance_autogen4'](fW,fX,fY);}else{throw new Error('Array\x20element\x20type\x20not\x20recognized.');}}else{return this['_GetCovariance_autogen4'](fW,fX,fY);}}else if(fW instanceof VariableContext&&fX instanceof VariableContext&&fY instanceof Array){var g1=fY;if(g1['length']>0x0){if(g1[0x0]instanceof State){return this['_GetCovariance_autogen7'](fW,fX,fY);}else if(g1[0x0]instanceof StateContext){return this['_GetCovariance_autogen8'](fW,fX,fY);}else{throw new Error('Array\x20element\x20type\x20not\x20recognized.');}}else{return this['_GetCovariance_autogen8'](fW,fX,fY);}}else if(fW instanceof Variable&&fX instanceof Variable&&fY instanceof TableIterator){return this['_GetCovariance_autogen9'](fW,fX,fY);}else if(fW instanceof VariableContext&&fX instanceof VariableContext&&fY instanceof TableIterator){return this['_GetCovariance_autogen11'](fW,fX,fY);}else if(typeof fW==='number'&&typeof fX==='number'&&typeof fY==='number'){return this['_GetCovariance_autogen0'](fW,fX,fY);}else{throw new Error('Invalid\x20method\x20arguments.');}}else if(fX!==undefined){return this['_GetCovariance_autogen2'](fW,fX);}else if(fW!==undefined){throw new Error('Invalid\x20method\x20arguments.');}else{throw new Error('Invalid\x20method\x20arguments.');}};cq['prototype']['_GetCovariance_autogen0']=function(g4,g5,g6){return this['_ru_x_'](g4,g5,g6);};cq['prototype']['_GetCovariance_autogen1']=function(g7,g8,g9){return this['getCovariance'](g7,null,g8,null,g9);};cq['prototype']['_GetCovariance_autogen2']=function(ga,gb){if(this['_E_x_']['size']!=0x1)throw new Error('This\x20overload\x20of\x20GetCovariance\x20can\x20only\x20be\x20called\x20when\x20the\x20distribution\x20does\x20not\x20contain\x20any\x20discrete\x20variables.');return this['getCovariance'](ga,null,gb,null,cq['_Da_x_']);};cq['prototype']['_GetCovariance_autogen3']=function(gc,gd,ge,gf){if(this['_E_x_']['size']!=0x1)throw new Error('This\x20overload\x20of\x20GetCovariance\x20can\x20only\x20be\x20called\x20when\x20the\x20distribution\x20does\x20not\x20contain\x20any\x20discrete\x20variables.');return this['getCovariance'](gc,gd,ge,gf,cq['_Da_x_']);};cq['prototype']['_GetCovariance_autogen4']=function(gg,gh,gi){return this['getCovariance'](gg,null,gh,null,gi);};cq['prototype']['_GetCovariance_autogen5']=function(gj,gk,gl,gm,gn){if(gj==null)throw new ReferenceError('continuousHeadA');if(gl==null)throw new ReferenceError('continuousHeadB');var go=this['_Cf_x_']['indexOf'](gj,gk);var gp=this['_Cf_x_']['indexOf'](gl,gm);return this['_ru_x_'](this['_E_x_']['getSortedIndex'](gn),go,gp);};cq['prototype']['_GetCovariance_autogen6']=function(gq,gr,gs,gt,gu){if(gq==null)throw new ReferenceError('continuousHeadA');if(gs==null)throw new ReferenceError('continuousHeadB');var gv=this['_Cf_x_']['indexOf'](gq,gr);var gw=this['_Cf_x_']['indexOf'](gs,gt);return this['_ru_x_'](this['_E_x_']['getSortedIndex'](gu),gv,gw);};cq['prototype']['_GetCovariance_autogen7']=function(gx,gy,gz){if(gx==null)throw new ReferenceError('continuousHeadA');if(gy==null)throw new ReferenceError('continuousHeadB');if(gx['headTail']!=HeadTail['Head'])throw new Error('continuousHeadA\x20is\x20not\x20Head');if(gy['headTail']!=HeadTail['Head'])throw new Error('continuousHeadB\x20is\x20not\x20head');return this['getCovariance'](gx['variable'],gx['time'],gy['variable'],gy['time'],gz);};cq['prototype']['_GetCovariance_autogen8']=function(gA,gB,gC){if(gA==null)throw new ReferenceError('continuousHeadA');if(gB==null)throw new ReferenceError('continuousHeadB');if(gA['headTail']!=HeadTail['Head'])throw new Error('continuousHeadA\x20is\x20not\x20Head');if(gB['headTail']!=HeadTail['Head'])throw new Error('continuousHeadB\x20is\x20not\x20head');return this['getCovariance'](gA['variable'],gA['time'],gB['variable'],gB['time'],gC);};cq['prototype']['_GetCovariance_autogen9']=function(gD,gE,gF){return this['getCovariance'](gD,null,gE,null,gF);};cq['prototype']['_GetCovariance_autogen10']=function(gG,gH,gI,gJ,gK){if(gG==null)throw new ReferenceError('continuousHeadA');if(gI==null)throw new ReferenceError('continuousHeadB');if(gK==null)throw new ReferenceError('iterator');if(gK['table']!=this['table'])throw new Error('TableIterator.Table\x20does\x20not\x20refer\x20to\x20this\x20instance.');var gL=this['_Cf_x_']['indexOf'](gG,gH);var gM=this['_Cf_x_']['indexOf'](gI,gJ);return this['_ru_x_'](gK['tableRow'],gL,gM);};cq['prototype']['_GetCovariance_autogen11']=function(gN,gO,gP){if(gN==null)throw new ReferenceError('continuousHeadA');if(gO==null)throw new ReferenceError('continuousHeadB');if(gN['headTail']!=HeadTail['Head'])throw new Error('continuousHeadA\x20is\x20not\x20Head');if(gO['headTail']!=HeadTail['Head'])throw new Error('continuousHeadB\x20is\x20not\x20head');return this['getCovariance'](gN['variable'],gN['time'],gO['variable'],gO['time'],gP);};cq['prototype']['_ru_x_']=function(gQ,gR,gS){return gR<gS?this['_Bg_x_'][gQ][gS][gR]:this['_Bg_x_'][gQ][gR][gS];};cq['prototype']['getWeight']=function(gT,gU,gV,gW,gX){if(gX!==undefined){if(gX instanceof Array){var gY=gX;if(gY['length']>0x0){if(gY[0x0]instanceof State){return this['_GetWeight_autogen2'](gT,gU,gV,gW,gX);}else if(gY[0x0]instanceof StateContext){return this['_GetWeight_autogen6'](gT,gU,gV,gW,gX);}else{throw new Error('Array\x20element\x20type\x20not\x20recognized.');}}else{return this['_GetWeight_autogen6'](gT,gU,gV,gW,gX);}}else if(gX instanceof TableIterator){return this['_GetWeight_autogen10'](gT,gU,gV,gW,gX);}else{throw new Error('Invalid\x20method\x20arguments.');}}else if(gW!==undefined){return this['_GetWeight_autogen7'](gT,gU,gV,gW);}else if(gV!==undefined){if(gT instanceof Variable&&gU instanceof Variable&&gV instanceof Array){var gY=gV;if(gY['length']>0x0){if(gY[0x0]instanceof State){return this['_GetWeight_autogen1'](gT,gU,gV);}else if(gY[0x0]instanceof StateContext){return this['_GetWeight_autogen4'](gT,gU,gV);}else{throw new Error('Array\x20element\x20type\x20not\x20recognized.');}}else{return this['_GetWeight_autogen4'](gT,gU,gV);}}else if(gT instanceof VariableContext&&gU instanceof VariableContext&&gV instanceof Array){var gY=gV;if(gY['length']>0x0){if(gY[0x0]instanceof State){return this['_GetWeight_autogen3'](gT,gU,gV);}else if(gY[0x0]instanceof StateContext){return this['_GetWeight_autogen8'](gT,gU,gV);}else{throw new Error('Array\x20element\x20type\x20not\x20recognized.');}}else{return this['_GetWeight_autogen8'](gT,gU,gV);}}else if(gT instanceof Variable&&gU instanceof Variable&&gV instanceof TableIterator){return this['_GetWeight_autogen9'](gT,gU,gV);}else if(gT instanceof VariableContext&&gU instanceof VariableContext&&gV instanceof TableIterator){return this['_GetWeight_autogen11'](gT,gU,gV);}else if(typeof gT==='number'&&typeof gU==='number'&&typeof gV==='number'){return this['_GetWeight_autogen0'](gT,gU,gV);}else{throw new Error('Invalid\x20method\x20arguments.');}}else if(gU!==undefined){return this['_GetWeight_autogen5'](gT,gU);}else if(gT!==undefined){throw new Error('Invalid\x20method\x20arguments.');}else{throw new Error('Invalid\x20method\x20arguments.');}};cq['prototype']['_GetWeight_autogen0']=function(h1,h2,h3){return this['_rv_x_'](h1,h2,h3);};cq['prototype']['_GetWeight_autogen1']=function(h4,h5,h6){return this['getWeight'](h4,null,h5,null,h6);};cq['prototype']['_GetWeight_autogen2']=function(h7,h8,h9,ha,hb){if(h7==null)throw new ReferenceError('continuousHead');if(h9==null)throw new ReferenceError('continuousTail');var hc=this['_Cf_x_']['indexOf'](h7,h8);var hd=this['_Cg_x_']['indexOf'](h9,ha);return this['_rv_x_'](this['_E_x_']['getSortedIndex'](hb),hc,hd);};cq['prototype']['_GetWeight_autogen3']=function(he,hf,hg){if(he==null)throw new ReferenceError('continuousHead');if(hf==null)throw new ReferenceError('continuousTail');if(he['headTail']!=HeadTail['Head'])throw new Error('continuousHead\x20is\x20not\x20Head');if(hf['headTail']!=HeadTail['Tail'])throw new Error('continuousTail\x20is\x20not\x20Tail');return this['getWeight'](he['variable'],he['time'],hf['variable'],hf['time'],hg);};cq['prototype']['_GetWeight_autogen4']=function(hh,hi,hj){return this['getWeight'](hh,null,hi,null,hj);};cq['prototype']['_GetWeight_autogen5']=function(hk,hl){if(this['_E_x_']['size']!=0x1)throw new Error('This\x20overload\x20of\x20GetWeight\x20can\x20only\x20be\x20called\x20when\x20the\x20distribution\x20does\x20not\x20contain\x20any\x20discrete\x20variables.');return this['getWeight'](hk,null,hl,null,cq['_Da_x_']);};cq['prototype']['_GetWeight_autogen6']=function(hm,hn,ho,hp,hq){if(hm==null)throw new ReferenceError('continuousHead');if(ho==null)throw new ReferenceError('continuousTail');var hr=this['_Cf_x_']['indexOf'](hm,hn);var hs=this['_Cg_x_']['indexOf'](ho,hp);return this['_rv_x_'](this['_E_x_']['getSortedIndex'](hq),hr,hs);};cq['prototype']['_GetWeight_autogen7']=function(ht,hu,hv,hw){if(this['_E_x_']['size']!=0x1)throw new Error('This\x20overload\x20of\x20GetWeight\x20can\x20only\x20be\x20called\x20when\x20the\x20distribution\x20does\x20not\x20contain\x20any\x20discrete\x20variables.');if(ht==null)throw new ReferenceError('continuousHead');if(hv==null)throw new ReferenceError('continuousTail');var hx=this['_Cf_x_']['indexOf'](ht,hu);var hy=this['_Cg_x_']['indexOf'](hv,hw);return this['_rv_x_'](0x0,hx,hy);};cq['prototype']['_GetWeight_autogen8']=function(hz,hA,hB){if(hz==null)throw new ReferenceError('continuousHead');if(hA==null)throw new ReferenceError('continuousTail');if(hz['headTail']!=HeadTail['Head'])throw new Error('continuousHead\x20is\x20not\x20Head');if(hA['headTail']!=HeadTail['Tail'])throw new Error('continuousTail\x20is\x20not\x20Tail');return this['getWeight'](hz['variable'],hz['time'],hA['variable'],hA['time'],hB);};cq['prototype']['_GetWeight_autogen9']=function(hC,hD,hE){return this['getWeight'](hC,null,hD,null,hE);};cq['prototype']['_GetWeight_autogen10']=function(hF,hG,hH,hI,hJ){if(hF==null)throw new ReferenceError('continuousHead');if(hH==null)throw new ReferenceError('continuousTail');if(hJ==null)throw new ReferenceError('iterator');if(hJ['table']!=this['table'])throw new Error('TableIterator.Table\x20does\x20not\x20refer\x20to\x20this\x20instance.');var hK=this['_Cf_x_']['indexOf'](hF,hG);var hL=this['_Cg_x_']['indexOf'](hH,hI);return this['_rv_x_'](hJ['tableRow'],hK,hL);};cq['prototype']['_GetWeight_autogen11']=function(hM,hN,hO){if(hM==null)throw new ReferenceError('continuousHead');if(hN==null)throw new ReferenceError('continuousTail');if(hM['headTail']!=HeadTail['Head'])throw new Error('continuousHead\x20is\x20not\x20Head');if(hN['headTail']!=HeadTail['Tail'])throw new Error('continuousTail\x20is\x20not\x20Tail');return this['getWeight'](hM['variable'],hM['time'],hN['variable'],hN['time'],hO);};cq['prototype']['_rv_x_']=function(hP,hQ,hR){return this['_Ca_x_'][hP][hQ][hR];};cq['prototype']['setMean']=function(hS,hT,hU,hV){if(hV!==undefined){if(hV instanceof Array){var hW=hV;if(hW['length']>0x0){if(hW[0x0]instanceof State){this['_SetMean_autogen2'](hS,hT,hU,hV);}else if(hW[0x0]instanceof StateContext){this['_SetMean_autogen7'](hS,hT,hU,hV);}else{throw new Error('Array\x20element\x20type\x20not\x20recognized.');}}else{this['_SetMean_autogen7'](hS,hT,hU,hV);}}else if(hV instanceof TableIterator){this['_SetMean_autogen10'](hS,hT,hU,hV);}else{throw new Error('Invalid\x20method\x20arguments.');}}else if(hU!==undefined){if(hS instanceof Variable&&typeof hT==='number'&&hU instanceof Array){var hW=hU;if(hW['length']>0x0){if(hW[0x0]instanceof State){this['_SetMean_autogen1'](hS,hT,hU);}else if(hW[0x0]instanceof StateContext){this['_SetMean_autogen4'](hS,hT,hU);}else{throw new Error('Array\x20element\x20type\x20not\x20recognized.');}}else{this['_SetMean_autogen4'](hS,hT,hU);}}else if(hS instanceof VariableContext&&typeof hT==='number'&&hU instanceof Array){var hW=hU;if(hW['length']>0x0){if(hW[0x0]instanceof State){this['_SetMean_autogen3'](hS,hT,hU);}else if(hW[0x0]instanceof StateContext){this['_SetMean_autogen8'](hS,hT,hU);}else{throw new Error('Array\x20element\x20type\x20not\x20recognized.');}}else{this['_SetMean_autogen8'](hS,hT,hU);}}else if(hS instanceof Variable&&typeof hT==='number'&&hU instanceof TableIterator){this['_SetMean_autogen9'](hS,hT,hU);}else if(hS instanceof VariableContext&&typeof hT==='number'&&hU instanceof TableIterator){this['_SetMean_autogen11'](hS,hT,hU);}else if(hS instanceof Variable&&(hT==null||typeof hT==='number')&&typeof hU==='number'){this['_SetMean_autogen6'](hS,hT,hU);}else if(typeof hS==='number'&&typeof hT==='number'&&typeof hU==='number'){this['_SetMean_autogen0'](hS,hT,hU);}else{throw new Error('Invalid\x20method\x20arguments.');}}else if(hT!==undefined){this['_SetMean_autogen5'](hS,hT);}else if(hS!==undefined){throw new Error('Invalid\x20method\x20arguments.');}else{throw new Error('Invalid\x20method\x20arguments.');}};cq['prototype']['_SetMean_autogen0']=function(hZ,i0,i1){this['_rr_x_']();this['_Bf_x_'][hZ][i0]=i1;};cq['prototype']['_SetMean_autogen1']=function(i2,i3,i4){this['setMean'](i2,null,i3,i4);};cq['prototype']['_SetMean_autogen2']=function(i5,i6,i7,i8){this['_rr_x_']();if(i5==null)throw new ReferenceError('continuousHead');var i9=this['_Cf_x_']['indexOf'](i5,i6);this['_Bf_x_'][this['_E_x_']['getSortedIndex'](i8)][i9]=i7;};cq['prototype']['_SetMean_autogen3']=function(ia,ib,ic){this['_rr_x_']();if(ia==null)throw new ReferenceError('continuousHead');if(ia['headTail']!=HeadTail['Head'])throw new Error('continuousHead\x20is\x20not\x20Head');this['setMean'](ia['variable'],ia['time'],ib,ic);};cq['prototype']['_SetMean_autogen4']=function(id,ie,ig){this['setMean'](id,null,ie,ig);};cq['prototype']['_SetMean_autogen5']=function(ih,ii){if(this['_E_x_']['size']!=0x1)throw new Error('This\x20overload\x20of\x20SetMean\x20can\x20only\x20be\x20called\x20when\x20the\x20distribution\x20does\x20not\x20contain\x20any\x20discrete\x20variables.');this['setMean'](ih,null,ii,cq['_Da_x_']);};cq['prototype']['_SetMean_autogen6']=function(ij,ik,il){if(this['_E_x_']['size']!=0x1)throw new Error('This\x20overload\x20of\x20SetMean\x20can\x20only\x20be\x20called\x20when\x20the\x20distribution\x20does\x20not\x20contain\x20any\x20discrete\x20variables.');this['setMean'](ij,ik,il,cq['_Da_x_']);};cq['prototype']['_SetMean_autogen7']=function(im,io,ip,iq){this['_rr_x_']();if(im==null)throw new ReferenceError('continuousHead');var ir=this['_Cf_x_']['indexOf'](im,io);this['_Bf_x_'][this['_E_x_']['getSortedIndex'](iq)][ir]=ip;};cq['prototype']['_SetMean_autogen8']=function(is,it,iu){this['_rr_x_']();if(is==null)throw new ReferenceError('continuousHead');if(is['headTail']!=HeadTail['Head'])throw new Error('continuousHead\x20is\x20not\x20Head');this['setMean'](is['variable'],is['time'],it,iu);};cq['prototype']['_SetMean_autogen9']=function(iv,iw,ix){this['setMean'](iv,null,iw,ix);};cq['prototype']['_SetMean_autogen10']=function(iy,iz,iA,iB){this['_rr_x_']();if(iy==null)throw new ReferenceError('continuousHead');if(iB==null)throw new ReferenceError('iterator');if(iB['table']!=this['table'])throw new Error('TableIterator.Table\x20does\x20not\x20refer\x20to\x20this\x20instance.');var iC=this['_Cf_x_']['indexOf'](iy,iz);this['_Bf_x_'][iB['tableRow']][iC]=iA;};cq['prototype']['_SetMean_autogen11']=function(iD,iE,iF){this['_rr_x_']();if(iD==null)throw new ReferenceError('continuousHead');if(iD['headTail']!=HeadTail['Head'])throw new Error('continuousHead\x20is\x20not\x20Head');this['setMean'](iD['variable'],iD['time'],iE,iF);};cq['prototype']['setCovariance']=function(iG,iH,iI,iJ,iK,iL){if(iL!==undefined){if(iL instanceof Array){var iM=iL;if(iM['length']>0x0){if(iM[0x0]instanceof State){this['_SetCovariance_autogen2'](iG,iH,iI,iJ,iK,iL);}else if(iM[0x0]instanceof StateContext){this['_SetCovariance_autogen5'](iG,iH,iI,iJ,iK,iL);}else{throw new Error('Array\x20element\x20type\x20not\x20recognized.');}}else{this['_SetCovariance_autogen5'](iG,iH,iI,iJ,iK,iL);}}