code
stringlengths
10
174k
nl
stringlengths
3
129k
public Vector2i sub(int x,int y,Vector2i dest){ dest.x=this.x - x; dest.y=this.y - y; return dest; }
Decrement the components of this vector by the given values and store the result in <code>dest</code>.
public void loadConf(DistributedLogConfiguration baseConf){ addConfiguration(baseConf); }
You can load configuration from other configuration
public CertificateException(){ super(); }
Constructs a certificate exception with no detail message. A detail message is a String that describes this particular exception.
private void reMeasureHeights(){ old_FirstVisiblePosition=old_LastVisiblePosition=0; getInnerScrollY(); }
(as its name). Its implementation has been changed to a more safe one.
private ASTRewrite generateForRewrite(AST ast){ ASTRewrite rewrite=ASTRewrite.create(ast); ForStatement loopStatement=ast.newForStatement(); SimpleName loopVariableName=resolveLinkedVariableNameWithProposals(rewrite,"int",null,true); loopStatement.initializers().add(getForInitializer(ast,loopVariableName)); F...
Helper to generate an index based <code>for</code> loop to iterate over an array.
public int hashCode(){ int iCode=0; for ( int anIV : iV) { iCode=(iCode * 75) + anIV; } return iCode; }
hashCode() reflects value-identity instead of object-identity
private void endWorkFlow(final BasicPropertyImpl basicProperty){ LOGGER.debug("endWorkFlow: Workflow will end for Property: " + property); property.transition().end(); basicProperty.setUnderWorkflow(false); LOGGER.debug("Exit method endWorkFlow, Workflow ended"); }
This method ends the workflow. The Property is transitioned to END state.
public FileTransferRequest(FileTransferManager manager,StreamInitiation si){ this.streamInitiation=si; this.manager=manager; }
A recieve request is constructed from the Stream Initiation request received from the initator.
public Frustum(){ this(new Plane(1,0,0,1),new Plane(-1,0,0,1),new Plane(0,1,0,1),new Plane(0,-1,0,1),new Plane(0,0,-1,1),new Plane(0,0,1,1)); }
Constructs a frustum two meters wide centered at the origin. Primarily used for testing.
public void mkdir(String path,boolean ignoreErrors) throws ReplicatorException { FilePath remote=new FilePath(path); try { if (ignoreErrors) hdfsFileIO.mkdirs(remote); else hdfsFileIO.mkdir(remote); } catch ( FileIOException e) { throw new ReplicatorException("Unable to create directory: hdfs p...
Creates a directory.
public static List<LoadMetadataDetails> identifySegmentsToBeMerged(String storeLocation,CarbonLoadModel carbonLoadModel,int partitionCount,long compactionSize,List<LoadMetadataDetails> segments,CompactionType compactionType){ List sortedSegments=new ArrayList(segments); sortSegments(sortedSegments); List<LoadMeta...
To identify which all segments can be merged.
public StrBuilder insert(int index,boolean value){ validateIndex(index); if (value) { ensureCapacity(size + 4); System.arraycopy(buffer,index,buffer,index + 4,size - index); buffer[index++]='t'; buffer[index++]='r'; buffer[index++]='u'; buffer[index]='e'; size+=4; } else { ensureC...
Inserts the value into this builder.
public void resetMetrics(){ assert prj instanceof IgniteCluster; ((IgniteCluster)prj).resetMetrics(); }
Resets local I/O, job, and task execution metrics.
public static void incrementalUpdate(DoubleArrayList data,int from,int to,double[] inOut){ checkRangeFromTo(from,to,data.size()); double min=inOut[0]; double max=inOut[1]; double sum=inOut[2]; double sumSquares=inOut[3]; double[] elements=data.elements(); for (; from <= to; from++) { double element=el...
Incrementally maintains and updates minimum, maximum, sum and sum of squares of a data sequence. Assume we have already recorded some data sequence elements and know their minimum, maximum, sum and sum of squares. Assume further, we are to record some more elements and to derive updated values of minimum, maximum, su...
private void addTextToString(String text,StringBuilder stringBuilder){ if (stringBuilder.length() > 0) { stringBuilder.append(", "); } stringBuilder.append(text); }
Adds text to the string builder and inserting a preceding comma if text already exists in the builder.
public Xform(RotateOrder rotateOrder){ super(); switch (rotateOrder) { case XYZ: getTransforms().addAll(t,p,rz,ry,rx,s,ip); break; case XZY: getTransforms().addAll(t,p,ry,rz,rx,s,ip); break; case YXZ: getTransforms().addAll(t,p,rz,rx,ry,s,ip); break; case YZX: getTransforms().addAll(t,p,rx,rz,ry,s,ip); break; c...
Instantiates a new xform.
protected void publish() throws MqttException, IOException { sampleClientPub=new SampleAsyncWait(url,clientIdPub,cleanSession,quietMode,userName,password); if (sampleClientPub != null) { String topic="Sample/Java/v3"; int qos=2; String message="Message from async calback MQTTv3 Java client sample"; ...
Publish / send a message to an MQTT server
@Override protected void addTestJob(final IResource target){ IJavaElement element=JavaCore.create(target); IJavaElement packageElement=element.getParent(); String packageName=packageElement.getElementName(); final String suiteClass=(!packageName.equals("") ? packageName + "." : "") + target.getName().replace("....
Add a new test generation job to the job queue
private void calculateCurrentOffsets(){ final float fraction=mExpandedFraction; mCurrentDrawX=interpolate(mExpandedDrawX,mCollapsedDrawX,fraction); mCurrentDrawY=interpolate(mExpandedDrawY,mCollapsedDrawY,fraction); setInterpolatedValues(interpolate(mfExpandedTextSize,mfCollapsedTextSize,fraction)); if (mColl...
Calculate the current offsets. These are interpolated co-ordinates that draw will use to draw the text. It also sets the interpolated text size of the paint to draw or a canvas scaling factor if the text size is between collapsed and expanded versions. Moreover, if the text colors for expanded and collapsed texts are d...
public Bidi(AttributedCharacterIterator paragraph){ if (paragraph == null) { throw new IllegalArgumentException("paragraph is null"); } bidiBase=new BidiBase(0,0); bidiBase.setPara(paragraph); }
Create Bidi from the given paragraph of text. <p> The RUN_DIRECTION attribute in the text, if present, determines the base direction (left-to-right or right-to-left). If not present, the base direction is computes using the Unicode Bidirectional Algorithm, defaulting to left-to-right if there are no strong directional...
final void advance(){ if (next == null) throw new NoSuchElementException(); lastReturned=next; while ((next=next.next) != null) { Object x=next.value; if (x != null && x != next) { @SuppressWarnings("unchecked") V vv=(V)x; nextValue=vv; break; } } }
Advances next to higher entry.
public void characters(char ch[],int start,int length) throws org.xml.sax.SAXException { if (isOutsideDocElem() && XMLCharacterRecognizer.isWhiteSpace(ch,start,length)) return; if (m_inCData) { cdata(ch,start,length); return; } String s=new String(ch,start,length); Node childNode; childNode=m_curr...
Receive notification of character data. <p>The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entit...
public TextEditGroup(String name){ super(); fDescription=name; fEdits=new ArrayList(3); }
Creates a new text edit group with the given name.
private void updateProgress(int progress){ if (myHost != null && progress != previousProgress) { myHost.updateProgress(progress); } previousProgress=progress; }
Used to communicate a progress update between a plugin tool and the main Whitebox user interface.
public Transfer writeBytes(byte[] data) throws IOException { if (data == null) { writeInt(-1); } else { writeInt(data.length); out.write(data); } return this; }
Write a byte array.
public UnrecognizedOptionException(String message){ super(message); }
Construct a new <code>UnrecognizedArgumentException</code> with the specified detail message.
public double noise(double x,double y,double z,double frequency,double amplitude){ return this.noise(x,y,z,frequency,amplitude,false); }
Generates noise for the 3D coordinates using the specified number of octaves and parameters
public Y lt(String value){ if (value == null || value.trim().length() == 0) { return super.lt((Long)null); } else { return super.lt(Long.parseLong(value.trim())); } }
SQL: <code>&lt;</code>
public void paint(Graphics g){ }
Method to show the visible cues of the interaction
public String generateSentence(){ String nextWord=""; Vector<String> startWords=chain.get("_start"); int startWordsLen=startWords.size(); if (startWordsLen == 0) { String error="The most likely cause is that the phrases you tried to use never occurred in Star Trek"; System.out.println(error); ChainB...
Generate and show a sentence from the Markov Chain
protected void clearOutEvents(){ }
This method resets the outgoing events.
@Deprecated protected final Class<?> defineClass(byte[] classRep,int offset,int length) throws ClassFormatError { return defineClass(null,classRep,offset,length); }
Constructs a new class from an array of bytes containing a class definition in class file format.
private void writeSkeletonDispatchCase(IndentingWriter p,int opnum) throws IOException { RemoteClass.Method method=remoteMethods[opnum]; Identifier methodName=method.getName(); Type methodType=method.getType(); Type paramTypes[]=methodType.getArgumentTypes(); String paramNames[]=nameParameters(paramTypes); ...
Write the case block for the skeleton's dispatch method for the remote method with the given "opnum".
public static StorageFaultE parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception { StorageFaultE object=new StorageFaultE(); int event; java.lang.String nillableValue=null; java.lang.String prefix=""; java.lang.String namespaceuri=""; try { while (!reader.isStartElement() && !reader...
static method to create the object Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable If this object is not an element, it is a complex type and the reader is at the event just after the outer start element Postcondition: If t...
@Override protected boolean isVisibleGhost(){ return true; }
Determine is the user can see this entity while in ghostmode.
public void registerDiffAction(@NotNull AnAction diffAction){ diffAction.registerCustomShortcutSet(diffAction.getShortcutSet(),myTable); }
Registers the diff action which will be called when the diff shortcut is pressed in the table.
public void write(OutputNode node,Object object) throws Exception { Collection list=(Collection)object; OutputNode parent=node.getParent(); for ( Object item : list) { primitive.write(parent,item); } }
The <code>write</code> method writes the fields from the given object to the XML element. After this has finished the element contains all attributes and sub-elements from the object.
public Builder subscript(){ this.subscript=true; return this; }
Sets this Piece as a subscript.
protected POInfo initPO(Properties ctx){ POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName()); return poi; }
Load Meta Data
public static com.linkedin.camus.example.records.DummyLog2.Builder newBuilder(com.linkedin.camus.example.records.DummyLog2 other){ return new com.linkedin.camus.example.records.DummyLog2.Builder(other); }
Creates a new DummyLog2 RecordBuilder by copying an existing DummyLog2 instance
protected void performHighlight(Highlight h,MotionEvent e){ if (h == null || h.equalTo(mLastHighlighted)) { mChart.highlightTouch(null); mLastHighlighted=null; } else { mLastHighlighted=h; mChart.highlightTouch(h); } }
Perform a highlight operation.
@Override protected void doGet(final HttpServletRequest req,final HttpServletResponse resp) throws IOException { @SuppressWarnings("unchecked") final Set<URI> externalURIs=(Set<URI>)req.getAttribute(ATTR_DESCRIBE_URIS); if (externalURIs == null) { buildAndCommitResponse(resp,HTTP_BADREQUEST,MIME_TEXT_PLAIN,"Req...
GET returns the DESCRIBE of the resource. FIXME DESCRIBE: TX ISOLATION for request but ensure that cache is not negatively effected by that isolation (i.e., how does the cache index based on time tx view).
public String rewriteLink(final String link,final String requestHost){ String newLink=link; try { URI uri=new URI(link); String linkHost=uri.getHost(); if (linkHost == null || linkHost.equals(requestHost)) { String path=uri.getPath(); path=StringUtils.removeStart(path,"/content"); if (...
Rewrite links based on the extensionless URLs settings.
public static void forceDelete(File file) throws IOException { if (file.isDirectory()) { deleteDirectory(file); } else { boolean filePresent=file.exists(); if (!file.delete()) { if (!filePresent) { throw new FileNotFoundException("File does not exist: " + file); } String messa...
Deletes a file. If file is a directory, delete it and all sub-directories. <p> The difference between File.delete() and this method are: <ul> <li>A directory to be deleted does not have to be empty.</li> <li>You get exceptions when a file or directory cannot be deleted. (java.io.File methods returns a boolean)</li> </u...
public boolean isNew(){ return m_isNew; }
Devuelve <tt>true</tt> si la carpeta es nueva
public static String formatInterval(int s){ boolean neg=s < 0; s=Math.abs(s); int d=s / 86400; int h=s % 86400 / 3600; int m=s % 3600 / 60; s=s % 60; StringBuilder buffer=new StringBuilder(); if (neg) { buffer.append('-'); } if (d > 0) { buffer.append(d).append(d == 1 ? " day " : " days "); ...
Format an interval
public static Vector<Object> errorAsVector(String msgId){ Vector<Object> err=new Vector<Object>(); err.add(errorAsString(msgId)); return err; }
Wraps the error message id into a Vector of Vector of String.<br> Structure of the error:<br> Vector[Vector[TAG_ERROR errorId]] </p>
public JBBPFieldStruct parse(final InputStream in) throws IOException { return this.parse(in,null,null); }
Parse an input stream.
public static void closeQuietly(PooledConnection con){ if (con == null) { return; } try { con.close(); } catch ( SQLException ex) { } }
Helper method to quietly close pooled connections.
public static boolean areNBTCompoundsEquals(NBTTagCompound a,NBTTagCompound b,List<String> exclusions){ Stack<String> tagOwners=new Stack<String>(); Stack<NBTTagCompound> aTagCompounds=new Stack<NBTTagCompound>(); Stack<NBTTagCompound> bTagCompounds=new Stack<NBTTagCompound>(); tagOwners.push(""); aTagCompoun...
Returns <tt>true</tt> if the two specified NBT compound tags are <i>equal</i> to one another. Two NBT compound tags are considered equal if both NBT compounds tags contain all of the same keys with the same values, while ignoring tags whose keys are in the exclusions list.
private String parseNumber(String info){ boolean hasPoint=info.indexOf('.') != -1; boolean hasComma=info.indexOf(',') != -1; if (hasComma && m_decimalPoint.equals(".")) info=info.replace(',',' '); if (hasPoint && m_decimalPoint.equals(",")) info=info.replace('.',' '); hasComma=info.indexOf(',') != -1; i...
Return number with "." decimal
public static void showToast(Context context,String message){ Toast.makeText(context,message,Toast.LENGTH_SHORT).show(); }
Show a toast message.
void sendReadCommand(int locoIOAddress,int locoIOSubAddress,int cv){ reading=true; tc.sendLocoNetMessage(LocoIO.readCV(locoIOAddress,locoIOSubAddress,cv)); startTimer(); }
Read a SV from a given LocoIO device
private CReferenceFinder(){ }
You are not supposed to instantiate this class.
public boolean maxValue(double val,double maxVal){ return GenericValidator.maxValue(val,maxVal); }
Checks if the value is less than or equal to the max.
private PostgreSQLFunctionNodeLoader(){ }
You are not supposed to instantiate this class.
public void paint(Graphics g){ graphics.render(g); }
Paints the layer.
@Override public void onGuiClosed(){ Keyboard.enableRepeatEvents(false); }
"Called when the screen is unloaded. Used to disable keyboard repeat events."
public void deleteTag(int tagId,int ifdId){ mData.removeTag(getTrueTagKey(tagId),ifdId); }
Removes the ExifTag for a tag constant from the given IFD.
public static synchronized SortedProperties loadProperties(String fileName) throws IOException { SortedProperties prop=new SortedProperties(); if (FileUtils.exists(fileName)) { InputStream in=null; try { in=FileUtils.newInputStream(fileName); prop.load(in); } finally { if (in != null...
Load a properties object from a file.
public List<ResultSet> query(String table,String[] columns,String selection,String[] selectionArgs,String groupBy,String having,String orderBy){ Cursor cursor=null; try { openDB(); cursor=mSQLiteDatabase.query(table,columns,selection,selectionArgs,groupBy,having,orderBy); if (cursor.getCount() < 1) { ...
a more flexible query by condition
public AnnotationVisitor visitTypeAnnotation(int typeRef,TypePath typePath,String desc,boolean visible){ if (api < Opcodes.ASM5) { throw new RuntimeException(); } if (mv != null) { return mv.visitTypeAnnotation(typeRef,typePath,desc,visible); } return null; }
Visits an annotation on a type in the method signature.
public ModelAdapterFactory(){ if (modelPackage == null) { modelPackage=ModelPackage.eINSTANCE; } }
Creates an instance of the adapter factory. <!-- begin-user-doc --> <!-- end-user-doc -->
protected ByteType(SqlType sqlType,Class<?>[] classes){ super(sqlType,classes); }
Here for others to subclass.
public Shape straightLineShape(){ GeneralPath path=null; if (llpts != null && llpts.length >= 4 && llpts.length % 2 == 0) { double y1=llpts[0]; double x1=llpts[1]; path=new GeneralPath(GeneralPath.WIND_EVEN_ODD,llpts.length / 2); if (returnDegrees) { path.moveTo(ProjMath.radToDeg(x1),ProjMath....
Creates a Shape object from provided coordinates.
boolean isTimedOut(long sesTimeout){ long time0=lastTouchTime.get(); if (time0 == TIMEDOUT_FLAG) return true; return U.currentTimeMillis() - time0 > sesTimeout && lastTouchTime.compareAndSet(time0,TIMEDOUT_FLAG); }
Checks expiration of session and if expired then sets TIMEDOUT_FLAG.
public void reset(){ try { signalControlOpStart(); getDependencyManagers().forEach(null); } finally { signalControlOpEnd(); this.initializer.accept(this); } }
Resets the ScriptEngines and re-initializes them. Waits for any existing script evaluations to complete but then blocks other operations until complete.
public SVGPath relativeLineTo(double[] xy){ return relativeLineTo(xy[0],xy[1]); }
Draw a line to the given relative coordinates.
public SiteQuery(URL feedUrl){ super(feedUrl); }
Constructs a new query object that targets a feed. The initial state of the query contains no parameters, meaning all entries in the feed would be returned if the query was executed immediately after construction.
public void reset(){ mLabelCache.clear(); }
Resets any stored state.
protected GenericDocument(){ }
Creates a new uninitialized document.
protected static float distance(float eventX,float startX,float eventY,float startY){ float dx=eventX - startX; float dy=eventY - startY; return (float)Math.sqrt(dx * dx + dy * dy); }
returns the distance between two points
private void selectBranch(){ presenter.showBranches(); presenter.onBranchSelected(selectedBranch); }
Select mock branch for testing.
public double det(){ return new LUDecomposition(this).det(); }
Matrix determinant
public String subject(){ return this.key; }
Gets subject of Entry.
private AttrStub parseAttrib(OpenElementStack out) throws ParseException { Token<HtmlTokenType> name=tokens.pop(); Token<HtmlTokenType> value=tokens.peek(); if (value.type == HtmlTokenType.ATTRVALUE) { tokens.advance(); if (isAmbiguousAttributeValue(value.text)) { mq.addMessage(MessageType.AMBIGUOUS...
Parses an element from a token stream.
private void checkComponents(Container target){ int size=target.getComponentCount(); for (int i=0; i < size; i++) { Component comp=target.getComponent(i); if (!m_data.containsValue(comp)) m_data.put(null,comp); } }
Check target components and add components, which don't have no constraints
@Override public void onGuiClosed(){ Keyboard.enableRepeatEvents(false); }
"Called when the screen is unloaded. Used to disable keyboard repeat events."
public static ObjectAnimator translateX(View view,float from,float to,int duration,AnimatorListenerAdapter listener){ ObjectAnimator translationX=ObjectAnimator.ofFloat(view,"translationX",from,to); translationX.setDuration(duration); if (listener != null) { translationX.addListener(listener); } translati...
translate along the x axis
protected POInfo initPO(Properties ctx){ POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName()); return poi; }
Load Meta Data
private void zoomInOut(final boolean horizontally,final boolean vertically,final double factor){ if (horizontally) for ( Axis axis : xyGraph.getXAxisList()) { final double center=axis.getPositionValue(start.x,false); axis.zoomInOut(center,factor); } if (vertically) for ( Axis axis : xyGraph.getYAxis...
Zoom 'in' or 'out' by a fixed factor
protected static final float computeUpdatedBaseLine(final float baseline,final float predictedRating,final float observedRating,final float gamma,final float lambda){ return baseline + gamma * ((predictedRating - observedRating) - lambda * baseline); }
Computes the updated baseline based on the formula: b := b + gamma * (error - lambda * b)
AvroMessageFormatter(SchemaRegistryClient schemaRegistryClient,boolean printKey){ this.schemaRegistry=schemaRegistryClient; this.printKey=printKey; }
For testing only.
public void accumulate(TaggedLogAPIEntity entity) throws Exception { AggregateAPIEntity current=root; for ( String groupby : groupbys) { String tagv=locateGroupbyField(groupby,entity); if (tagv == null || tagv.isEmpty()) { tagv=UNASSIGNED_GROUPBY_ROOT_FIELD_NAME; } Map<String,AggregateAPIEnti...
currently only group by tags groupbys' first item always is site, which is a reserved field
public DnsSdTxtRecord(byte[] data){ mData=(byte[])data.clone(); }
Constructs a new TXT record from a byte array in the standard format.
private void returnData(Object ret){ if (myHost != null) { myHost.returnData(ret); } }
Used to communicate a return object from a plugin tool to the main Whitebox user-interface.
int itemsInWindow(boolean scrollbarVisible){ int h; if (scrollbarVisible) { h=height - ((2 * MARGIN) + SCROLLBAR_AREA); } else { h=height - 2 * MARGIN; } return (h / getItemHeight()); }
return the number of items that can fit in the current window
@Override public V put(K key,V value){ return putImpl(key,value); }
Maps the specified key to the specified value.
public void clear(){ final ReentrantLock lock=this.lock; lock.lock(); try { q.clear(); } finally { lock.unlock(); } }
Atomically removes all of the elements from this delay queue. The queue will be empty after this call returns. Elements with an unexpired delay are not waited for; they are simply discarded from the queue.
private void dynInit(){ String sql=MRole.getDefault().addAccessSQL("SELECT AD_Role_ID, Name FROM AD_Role ORDER BY 2","AD_Role",MRole.SQL_NOTQUALIFIED,MRole.SQL_RO); roleField=new CComboBox(DB.getKeyNamePairs(sql,false)); sql="SELECT * FROM AD_Record_Access " + "WHERE AD_Table_ID=? AND Record_ID=? AND AD_Client_ID...
Dynamic Init
public CHM(int initialCapacity,float loadFactor,int concurrencyLevel){ if (!(loadFactor > 0) || initialCapacity < 0 || concurrencyLevel <= 0) throw new IllegalArgumentException(); if (concurrencyLevel > MAX_SEGS) concurrencyLevel=MAX_SEGS; int sshift=0; int ssize=1; while (ssize < concurrencyLevel) { ...
Creates a new, empty map with the specified initial capacity, load factor and concurrency level.
private void logCallException(Throwable e){ if (callLog.isLoggable(Log.BRIEF)) { String clientHost=""; try { clientHost="[" + getClientHost() + "] "; } catch ( ServerNotActiveException snae) { } callLog.log(Log.BRIEF,clientHost + "exception: ",e); } if (wantExceptionLog) { java.i...
Log the exception detail of an incoming call.
protected int oldFindAndEliminateRedundant(int start,int firstOccuranceIndex,ExpressionOwner firstOccuranceOwner,ElemTemplateElement psuedoVarRecipient,Vector paths) throws org.w3c.dom.DOMException { QName uniquePseudoVarName=null; boolean foundFirst=false; int numPathsFound=0; int n=paths.size(); Expression ...
To be removed.
public void test_2KBCreateAndDiscovery() throws Exception { final String namespace=getName(); final String namespace2=getName() + "2"; final Properties properties=getProperties(); Journal jnl=null; try { jnl=new Journal(properties); assertKBNotFound(jnl,namespace); AbstractApiTask.submitApiTask(jn...
A non-concurrent version with two KBs.
public void shutdown(){ }
Attempt to complete all submitted requests, but stop accepting new requests.
public void add(double value){ if (count == 0) { count=1; mean=value; min=value; max=value; if (!isFinite(value)) { sumOfSquaresOfDeltas=NaN; } } else { count++; if (isFinite(value) && isFinite(mean)) { double delta=value - mean; mean+=delta / count; sumOfSqu...
Adds the given value to the dataset.
public double computeAverageLocalOfObservationsWithCorrection() throws Exception { double te=0.0; for (int b=0; b < totalObservations; b++) { int timeSeries=timeSeriesIndex[b]; double[] source=vectorOfSourceObservations.elementAt(timeSeries); double[] dest=vectorOfDestinationObservations.elementAt(timeS...
<p>Computes the average Transfer Entropy for the previously supplied observations, using the Grassberger correction for the point count k: log_e(k) ~= digamma(k).</p> <p>Kaiser and Schreiber, Physica D 166 (2002) pp. 43-62 suggest (on p. 57) that for the TE though the adverse correction of the bias correction is worse ...
public boolean isDefaultCounterDoc(){ Object oo=get_Value(COLUMNNAME_IsDefaultCounterDoc); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; }
Get Default Counter Document.
public void expandBy(double distance){ expandBy(distance,distance); }
Expands this envelope by a given distance in all directions. Both positive and negative distances are supported.
@Override protected void onPause(){ super.onPause(); SharedPreferences.Editor editor=getPreferences(0).edit(); editor.putString("text",mSaved.getText().toString()); editor.putInt("selection-start",mSaved.getSelectionStart()); editor.putInt("selection-end",mSaved.getSelectionEnd()); editor.commit(); }
Any time we are paused we need to save away the current state, so it will be restored correctly when we are resumed.