Created
December 11, 2017 16:14
-
-
Save miho/e23e6a72af9bf83c1d0fe5c507c37357 to your computer and use it in GitHub Desktop.
This file contains hidden or 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="TrajectoryToVector", category="Custom") | |
| public class VectorTrajectoryToVector implements java.io.Serializable { | |
| private static final long serialVersionUID=1L; | |
| // add your code here | |
| @OutputInfo(name="Vector", options="serialization=false") | |
| public double[] convert( | |
| @ParamInfo(name="Trajectory", style="default", options="") VectorTrajectory vt, | |
| @ParamInfo(name="Time Step", style="default", options="") int timeStep) { | |
| double[] v = new double[vt[0].length-1] | |
| for (int i = 0; i < v.length; i++) { | |
| v[i] = vt[timeStep][i+1] | |
| } | |
| return v | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment