107 error(
" MemoryTrajectoryData cannot be used as java is not enabled. ");
109 this.hm= java.util.HashMap;
125 if this.hm.containsKey(key)
126 idx = this.hm.get(key);
128 ctime = this.ctimes(idx);
155 function [colvec<double>x , colvec<double>mu , integerinputidx , doublectime ] =
getTrajectoryNr(nr) {
157 error(
" Invalid trajectory number: %d ",nr);
168 ctime = this.ctimes(nr);
188 error(
" MemoryTrajectoryData can only hold TrajectoryData of one type. Having InputIndices and not at the same time is not allowed. ");
191 error(
" MemoryTrajectoryData can only hold TrajectoryData of one type. Having parameters and not at the same time is not allowed. ");
194 error(
" New trajectory size mismatches the size of already stored TrajectoryData. ");
198 if this.hm.containsKey(key)
199 warning(
" KerMor:MemoryTrajectoryData ",
" Trajectory already present. Replacing ");
206 if ~isempty(inputidx)
210 this.hm.put(key,idx);
211 this.ctimes(idx) = ctime;
245 function [n , m ] =
size(dim) {
249 if dim > 0 && dim < 3
281 m = data.MemoryTrajectoryData;
286 tr(:,:,i) = rand(30,50);
296 m.addTrajectory(tr(:,:,i),p(:,i),[],1);
298 res = res && m.getNumTrajectories == T;
301 [x, pi] = m.getTrajectoryNr(i);
302 res = res && isequal(x,tr(:,:,i)) && isequal(p(:,i),pi);
303 x = m.getTrajectory(p(:,i),[]);
304 res = res && isequal(x,tr(:,:,i));
310 m.addTrajectory(tr(:,:,i),[],in(i),1);
312 res = res && m.getNumTrajectories == T;
315 [x, ~, ini] = m.getTrajectoryNr(i);
316 res = res && isequal(x,tr(:,:,i)) && isequal(ini,in(i));
317 x = m.getTrajectory([],in(i));
318 res = res && isequal(x,tr(:,:,i));
324 m.addTrajectory(tr(:,:,i),p(:,i),in(i),1);
326 res = res && m.getNumTrajectories == T;
332 [x, pi, ini] = m.getTrajectoryNr(i);
333 res = res && isequal(x,tr(:,:,i)) && isequal(ini,in(i)) && isequal(p(:,i),pi);
334 x = m.getTrajectory(p(:,i),in(i));
335 res = res && isequal(x,tr(:,:,i));
function l = getTotalLength()
Length of the stored trajectories.
Collection of generally useful functions.
function [ colvec< double > x , X ] = getBoundingBox()
Gets the bounding box of the state space of all trajectories.
function addTrajectory(colvec< double > x,colvec< double > mu,integer inputidx,double ctime)
Adds a trajectory to the ModelData instance.
function B = getBlock(unused1)
function [ colvec< double > x , colvec< double > mu , integer inputidx , double ctime ] = getTrajectoryNr(nr)
Gets the trajectory with the number nr.
function n = getNumTrajectories()
Gets the total number of trajectories.
reshape
hanges the dimensions of the handle object array to the specified dimensions. See the MATLAB reshape ...
TrajectoryData
The trajectories in a dim x timelength x trajectorynumber array.
Data class that contains a model's large data, purely in system memory.
function clearTrajectories()
Clears all stored trajectory data.
function [ colvec< double > x , double ctime ] = getTrajectory(colvec< double > mu,integer inputidx)
Gets a system's trajectory for the given and inputindex. Returns [] if no trajectory is found in the...
function [ d , mud ] = getTrajectoryDoFs()
Returns the degrees of freedom for the trajectories and parameter size.
static function h = getHash(vec)
Returns a hash code for the given vector.
function n = getNumBlocks()
% data.ABlockedData implementations
function [ n , m ] = size(dim)
% data.ABlockedData implementations
Data class that contains a model's large data, including subspace matrices, trajectories and approxim...
static function res = test_MemoryTrajectoryData()
Parameters
The parameters associated with the trajectories. Each column index corresponds to the trajectory numb...
static function [ double bmin , double bmax ] = getBoundingBox(double vectors)
Gets the bounding box for a matrix containing column vectors.
InputIndices
The input indices associated with the trajectories. Each column index corresponds to the trajectory n...