This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package eu.mihosoft.vrl.user; | |
@ComponentInfo(name="HeatDiscretization1DTemplate", category="Custom") | |
public class HeatDiscretization1DTemplate implements java.io.Serializable { | |
private static final long serialVersionUID=1L; | |
@OutputInfo(name="Results:", style="multi-out", | |
elemTypes=[VectorRhsODEInterface.class, JacobianInputInterface.class, double[].class], | |
elemNames=["f", "Df", "u0"] | |
) | |
public Object[] discretize( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package eu.mihosoft.vrl.user; | |
import eu.mihosoft.vrl.user.VectorRhsODEInterface; | |
/** | |
* Explicit Euler Method | |
*/ | |
@ComponentInfo(name="VectorExplicitEuler", category="ODE") | |
public class VectorExplicitEuler implements java.io.Serializable { | |
private static final long serialVersionUID=1L; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
A trivial Arduino sketch to mimic iRobot Virtual Wall for Roomba | |
---------------------------------------------------------------- | |
Based on information found at: | |
http://sites.google.com/site/irobotcreate2/createanirbeacon | |
Uses "A Multi-Protocol Infrared Remote Library for the Arduino": | |
http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <IRremote.h> | |
/* | |
Send infrared commands from the Arduino to the iRobot Roomba | |
by probono | |
2013-03-17 Initial release | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.file.Files; | |
@ComponentInfo(name="SaveStringToFile", category="Custom") | |
public class SaveStringToFile implements java.io.Serializable { | |
private static final long serialVersionUID=1L; | |
// add your code here | |
public void saveStringTheJavaWay(String s, @ParamInfo(name="", style="save-dialog", options="") File f) { | |
Files.write(f.toPath(), s.getBytes()) // overwrite file if it exists | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package eu.mihosoft.vrl.user; | |
@ComponentInfo(name="CSVReader", category="Custom") | |
public class CSVReader implements java.io.Serializable { | |
private static final long serialVersionUID=1L; | |
// ---- add your code here ----- | |
public void plot( | |
@ParamInfo(name="CSV File", style="load-dialog", options="") File input, | |
@ParamInfo(name="Separator", options="value=\",\"") String sep, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import edu.gcsc.vrl.jfreechart.TrajectoryPlotter; | |
import org.jfree.chart.JFreeChart; | |
@ComponentInfo(name="TangentLine", category="Custom") | |
public class TangentLine implements java.io.Serializable { | |
private static final long serialVersionUID=1L; | |
// plotter object | |
private transient TrajectoryPlotter plotter; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package eu.mihosoft.vrl.user; | |
@ComponentInfo(name="Dopri45Scheme", category="ODE") | |
public class Dopri45Scheme implements EmbeddedRKSchemeInterface, java.io.Serializable { | |
private static final long serialVersionUID=1L; | |
public double[] getC() { | |
// add your code | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package eu.mihosoft.vrl.user; | |
import eu.mihosoft.vrl.user.VectorTrajectory; | |
@ComponentInfo(name="VectorTrajectoryToFile", category="JFreeChart") | |
public class VectorTrajectoryToFile implements java.io.Serializable { | |
private static final long serialVersionUID=1L; | |
public void toFile( | |
@ParamInfo(name="VectorTrajectory", style="default", options="") VectorTrajectory vt, | |
@ParamInfo(name="", style="save-dialog", options="") File file) { | |
file.newWriter().withWriter{w-> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package eu.mihosoft.vrl.user; | |
@ComponentInfo(name="VectorInput", category="ODE") | |
public class VectorInput implements java.io.Serializable { | |
private static final long serialVersionUID=1L; | |
// add your code here | |
@MethodInfo(name="", valueName="v", valueStyle="default", valueOptions="", hide=false) | |
public double[] vector(@ParamInfo(name="", style="array", options="") Double[] v) { | |
return v | |
} |