[ellipsoids] r2755 committed - issue 133...

2 views
Skip to first unread message

ellip...@googlecode.com

unread,
Feb 23, 2014, 8:41:28 PM2/23/14
to ellipsoids-change...@googlegroups.com
Revision: 2755
Author: anna.ata...@gmail.com
Date: Mon Feb 24 01:41:07 2014 UTC
Log: issue 133
Enhancement: committing all of the examples and descriptions of methods
http://code.google.com/p/ellipsoids/source/detail?r=2755

Added:

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromEllArray.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromQMArrays1.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromQMArrays2.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromQMScaledArrays1.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromQMScaledArrays2.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_isEqual1.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_isEqual2.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_projectToOrths1.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_projectToOrths2.m
Deleted:

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromEllArray1.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromEllArray2.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromQMArrays.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromQMScaledArrays.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_isEqual.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_projectToOrths.m
Modified:

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_cut1.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_cut2.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromEllMArray.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromQArrays1.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromQArrays2.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_interp.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_project.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_scale.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_thinOutTuples.m

/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+mlunit/ExamplesTC.m

=======================================
--- /dev/null
+++
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromEllArray.m
Mon Feb 24 01:41:07 2014 UTC
@@ -0,0 +1,23 @@
+% An example of creating nTubes ellipsoid tube objects using fromEllArray
+% function.
+nPoints=10;
+absTol=0.01;
+relTol=0.01;
+approxSchemaDescr='Internal';
+approxSchemaName='Internal';
+nDims=3;
+nTubes=1;
+lsGoodDirVec=[1;0;1];
+timeVec=(1/nPoints):(1/nPoints):1;
+sTime=timeVec(randi(nPoints,1));
+approxType=gras.ellapx.enums.EApproxType.Internal;
+ellArray(nPoints) = ellipsoid();
+aMat=zeros(nDims,nPoints);
+qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},1,1);
+for iElem = 1:nPoints
+ ellArray(iElem) = ellipsoid(aMat(:,iElem), qArrayList{1}(:,:,iElem));
+end;
+ellnArray = repmat(ellArray,nTubes,1);
+fromEllArrayEllTube = gras.ellapx.smartdb.rels.EllTube.fromEllArray(...
+ ellnArray,timeVec, ltGoodDirArray, sTime, approxType,...
+ approxSchemaName,approxSchemaDescr, absTol, relTol);
=======================================
--- /dev/null
+++
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromQMArrays1.m
Mon Feb 24 01:41:07 2014 UTC
@@ -0,0 +1,23 @@
+% An example of creating nTubes ellipsoid tube objects using fromQMArrays
+% function with the same type of approximation.
+nPoints=10;
+absTol=0.01;
+relTol=0.01;
+approxSchemaDescr='External';
+approxSchemaName='External';
+nDims=3;
+nTubes=3;
+lsGoodDirVec=[1;0;1];
+aMat=zeros(nDims,nPoints);
+timeVec=(1/nPoints):(1/nPoints):1;
+sTime=timeVec(randi(nPoints,1));
+approxType=gras.ellapx.enums.EApproxType.External;
+mArrayList=repmat({repmat(diag([0.1 0.2 0.3]),[1,1,nPoints])},...
+ 1,nTubes);
+qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
+ 1,nTubes);
+ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
+fromMatMEllTube=gras.ellapx.smartdb.rels.EllTube.fromQMArrays(...
+ qArrayList, aMat, mArrayList, timeVec,...
+ ltGoodDirArray, sTime, approxType, approxSchemaName,...
+ approxSchemaDescr, absTol, relTol);
=======================================
--- /dev/null
+++
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromQMArrays2.m
Mon Feb 24 01:41:07 2014 UTC
@@ -0,0 +1,25 @@
+% An example of creating nTubes ellipsoid tube objects using fromQMArrays
+% function with different types of approximation.
+nPoints=10;
+absTol=0.01;
+relTol=0.01;
+approxSchemaDescr={'Internal'; 'External'; 'External'};
+approxSchemaName={'Internal'; 'External'; 'External'};
+nDims=3;
+nTubes=3;
+lsGoodDirVec=[1;0;1];
+aMat=zeros(nDims,nPoints);
+timeVec=(1/nPoints):(1/nPoints):1;
+sTime=timeVec(randi(nPoints,1));
+approxType=[gras.ellapx.enums.EApproxType.Internal,...
+ gras.ellapx.enums.EApproxType.External,...
+ gras.ellapx.enums.EApproxType.External]';
+mArrayList=repmat({repmat(diag([0.1 0.2 0.3]),[1,1,nPoints])},...
+ 1,nTubes);
+qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
+ 1,nTubes);
+ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
+fromMatMEllTube=gras.ellapx.smartdb.rels.EllTube.fromQMArrays(...
+ qArrayList, aMat, mArrayList, timeVec,...
+ ltGoodDirArray, sTime, approxType, approxSchemaName,...
+ approxSchemaDescr, absTol, relTol);
=======================================
--- /dev/null
+++
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromQMScaledArrays1.m
Mon Feb 24 01:41:07 2014 UTC
@@ -0,0 +1,26 @@
+% An example of creating nTubes ellipsoid tube objects using
fromQMScaledArrays
+% function with the same type of approximation.
+nPoints=10;
+absTol=0.01;
+relTol=0.01;
+approxSchemaDescr='Internal';
+approxSchemaName='Internal';
+nDims=3;
+nTubes=5;
+lsGoodDirVec=[1;0;1];
+aMat=zeros(nDims,nPoints);
+timeVec=(1/nPoints):(1/nPoints):1;
+sTime=timeVec(randi(nPoints,1));
+approxType=gras.ellapx.enums.EApproxType.Internal;
+qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
+ 1,nTubes);
+mArrayList=repmat({repmat(diag([0.1 0.2 0.3]),[1,1,nPoints])},...
+ 1,nTubes);
+ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
+scaleFactor = ones(1,nTubes);
+fromQMScaledArraysEllTube = ...
+ gras.ellapx.smartdb.rels.EllTube.fromQMScaledArrays(...
+ qArrayList,aMat,mArrayList,timeVec,...
+ ltGoodDirArray,sTime,approxType,approxSchemaName,...
+ approxSchemaDescr,absTol, relTol,...
+ scaleFactor);
=======================================
--- /dev/null
+++
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromQMScaledArrays2.m
Mon Feb 24 01:41:07 2014 UTC
@@ -0,0 +1,28 @@
+% An example of creating nTubes ellipsoid tube objects using
fromQMScaledArrays
+% function with different types of approximation.
+nPoints=10;
+absTol=0.01;
+relTol=0.01;
+approxSchemaDescr={'Internal'; 'Internal'; 'External'};
+approxSchemaName={'Internal'; 'Internal'; 'External'};
+nDims=3;
+nTubes=3;
+lsGoodDirVec=[1;0;1];
+aMat=zeros(nDims,nPoints);
+timeVec=(1/nPoints):(1/nPoints):1;
+sTime=timeVec(randi(nPoints,1));
+approxType=[gras.ellapx.enums.EApproxType.Internal,...
+ gras.ellapx.enums.EApproxType.Internal,...
+ gras.ellapx.enums.EApproxType.External]';
+qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
+ 1,nTubes);
+mArrayList=repmat({repmat(diag([0.1 0.2 0.3]),[1,1,nPoints])},...
+ 1,nTubes);
+ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
+scaleFactor = ones(1,nTubes);
+fromQMScaledArraysEllTube = ...
+ gras.ellapx.smartdb.rels.EllTube.fromQMScaledArrays(...
+ qArrayList,aMat,mArrayList,timeVec,...
+ ltGoodDirArray,sTime,approxType,approxSchemaName,...
+ approxSchemaDescr,absTol, relTol,...
+ scaleFactor);
=======================================
--- /dev/null
+++
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_isEqual1.m
Mon Feb 24 01:41:07 2014 UTC
@@ -0,0 +1,30 @@
+% An example ISEQUAL function usage. In it two ellipsoid tube objects are
+% created and compared. This is the example of the siplest usage of this
+% function with the minimum of input arguments. These ellipsoid tubes are
+% not equal because of different lsGoodDirVec vectors.
+nPoints=10;
+absTol=0.01;
+relTol=0.01;
+approxSchemaDescr='Internal';
+approxSchemaName='Internal';
+nDims=3;
+nTubes=1;
+lsGoodDirVec=[1;0;1];
+aMat=zeros(nDims,nPoints);
+timeVec=(1/nPoints):(1/nPoints):1;
+sTime=timeVec(randi(nPoints,1));
+approxType=gras.ellapx.enums.EApproxType.Internal;
+qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
+ 1,nTubes);
+ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
+firstEllTube=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
+ qArrayList, aMat, timeVec,...
+ ltGoodDirArray, sTime, approxType, approxSchemaName,...
+ approxSchemaDescr, absTol, relTol);
+lsGoodDirVec=[1;0;0];
+ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
+secondEllTube=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
+ qArrayList, aMat, timeVec,...
+ ltGoodDirArray, sTime, approxType, approxSchemaName,...
+ approxSchemaDescr, absTol, relTol);
+firstEllTube.isEqual(secondEllTube);
=======================================
--- /dev/null
+++
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_isEqual2.m
Mon Feb 24 01:41:07 2014 UTC
@@ -0,0 +1,30 @@
+% An example ISEQUAL function usage. In it two ellipsoid tube objects are
+% created and compared. This is the example of the siplest usage of this
+% function with the minimum of input arguments. These ellipsoid tubes are
+% equal.
+nPoints=10;
+absTol=0.01;
+relTol=0.01;
+approxSchemaDescr='Internal';
+approxSchemaName='Internal';
+nDims=3;
+nTubes=1;
+lsGoodDirVec=[1;0;1];
+aMat=zeros(nDims,nPoints);
+timeVec=(1/nPoints):(1/nPoints):1;
+sTime=timeVec(randi(nPoints,1));
+approxType=gras.ellapx.enums.EApproxType.Internal;
+qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
+ 1,nTubes);
+ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
+firstEllTube=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
+ qArrayList, aMat, timeVec,...
+ ltGoodDirArray, sTime, approxType, approxSchemaName,...
+ approxSchemaDescr, absTol, relTol);
+secondEllTube=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
+ qArrayList, aMat, timeVec,...
+ ltGoodDirArray, sTime, approxType, approxSchemaName,...
+ approxSchemaDescr, absTol, relTol);
+firstEllTube.isEqual(secondEllTube,'checkFieldOrder',false,...
+ 'checkTupleOrder',false,'maxTolerance',0.0001,...
+ 'maxRelativeTolerance',0.0001);
=======================================
--- /dev/null
+++
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_projectToOrths1.m
Mon Feb 24 01:41:07 2014 UTC
@@ -0,0 +1,25 @@
+% Examples of calculating ellipsoid tube object projection to basic orths
+% using PROJECTTOORTHS function. This is an example of projectToOrths usage
+% with one input variable. The default value of projection type is used.
+nPoints=10;
+absTol=0.01;
+relTol=0.01;
+approxSchemaDescr='Internal';
+approxSchemaName='Internal';
+nDims=3;
+nTubes=1;
+lsGoodDirVec=[1;0;1];
+aMat=zeros(nDims,nPoints);
+timeVec=(1/nPoints):(1/nPoints):1;
+sTime=timeVec(randi(nPoints,1));
+approxType=gras.ellapx.enums.EApproxType.Internal;
+qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
+ 1,nTubes);
+ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
+fromMatEllTube=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
+ qArrayList, aMat, timeVec,...
+ ltGoodDirArray, sTime, approxType, approxSchemaName,...
+ approxSchemaDescr, absTol, relTol);
+ellTubeProjRel = fromMatEllTube.projectToOrths([1,2]);
+plObj=smartdb.disp.RelationDataPlotter();
+ellTubeProjRel.plot(plObj);
=======================================
--- /dev/null
+++
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_projectToOrths2.m
Mon Feb 24 01:41:07 2014 UTC
@@ -0,0 +1,26 @@
+% Examples of calculating ellipsoid tube object projection to basic orths
+% using PROJECTTOORTHS function. This is an example of projectToOrths usage
+% with specified projection type.
+nPoints=10;
+absTol=0.01;
+relTol=0.01;
+approxSchemaDescr='Internal';
+approxSchemaName='Internal';
+nDims=3;
+nTubes=1;
+lsGoodDirVec=[1;0;1];
+aMat=zeros(nDims,nPoints);
+timeVec=(1/nPoints):(1/nPoints):1;
+sTime=timeVec(randi(nPoints,1));
+approxType=gras.ellapx.enums.EApproxType.Internal;
+qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
+ 1,nTubes);
+ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
+fromMatEllTube=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
+ qArrayList, aMat, timeVec,...
+ ltGoodDirArray, sTime, approxType, approxSchemaName,...
+ approxSchemaDescr, absTol, relTol);
+projType = gras.ellapx.enums.EProjType.DynamicAlongGoodCurve;
+ellTubeProjRel = fromMatEllTube.projectToOrths([1,2], projType);
+plObj=smartdb.disp.RelationDataPlotter();
+ellTubeProjRel.plot(plObj);
=======================================
---
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromEllArray1.m
Sun Feb 23 23:12:29 2014 UTC
+++ /dev/null
@@ -1,23 +0,0 @@
-% An example of creating nTubes ellipsoid tube objects using fromEllArray
-% function.
-nPoints=10;
-absTol=0.01;
-relTol=0.01;
-approxSchemaDescr='Internal';
-approxSchemaName='Internal';
-nDims=3;
-nTubes=5;
-lsGoodDirVec=[1;0;1];
-timeVec=(1/nPoints):(1/nPoints):1;
-sTime=timeVec(randi(nPoints,1));
-approxType=gras.ellapx.enums.EApproxType.Internal;
-ellArray(nPoints) = ellipsoid();
-aMat=zeros(nDims,nPoints);
-qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},1,nTubes);
-for iElem = 1:nPoints
- ellArray(iElem) = ellipsoid(aMat(:,iElem), qArrayList{1}(:,:,iElem));
-end;
-ellArray
-fromEllArrayEllTube = gras.ellapx.smartdb.rels.EllTube.fromEllArray(...
- ellArray,timeVec, ltGoodDirArray, sTime, approxType,...
- approxSchemaName,approxSchemaDescr, absTol, relTol)
=======================================
---
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromEllArray2.m
Sun Feb 23 23:12:29 2014 UTC
+++ /dev/null
@@ -1,25 +0,0 @@
-% An example of creating nTubes ellipsoid tube objects using fromEllArray
-% function.
-nPoints=10;
-absTol=0.01;
-relTol=0.01;
-approxSchemaDescr=['Internal', 'External', 'Internal']';
-approxSchemaName=['Internal', 'External', 'Internal']';
-nDims=3;
-nTubes=3;
-lsGoodDirVec=[1;0;1];
-timeVec=(1/nPoints):(1/nPoints):1;
-sTime=timeVec(randi(nPoints,1));
-approxType=[gras.ellapx.enums.EApproxType.Internal,...
- gras.ellapx.enums.EApproxType.External,...
- gras.ellapx.enums.EApproxType.Internal]';
-ellArray(nPoints) = ellipsoid();
-aMat=zeros(nDims,nPoints);
-qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},1,1);
-for iElem = 1:nPoints
- ellArray(iElem) = ellipsoid(aMat(:,iElem), qArrayList{1}(:,:,iElem));
-end;
-ellnArray = repmat(ellArray,nTubes,1)'
-fromEllArrayEllTube = gras.ellapx.smartdb.rels.EllTube.fromEllArray(...
- ellnArray,timeVec, ltGoodDirArray, sTime, approxType,...
- approxSchemaName,approxSchemaDescr, absTol, relTol);
=======================================
---
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromQMArrays.m
Mon Nov 11 04:51:12 2013 UTC
+++ /dev/null
@@ -1,22 +0,0 @@
-% An example of creating nTubes ellipsoid tube objects using fromQMArrays
-% function.
-nPoints=5;
-calcPrecision=0.001;
-approxSchemaDescr=char.empty(1,0);
-approxSchemaName=char.empty(1,0);
-nDims=3;
-nTubes=4;
-lsGoodDirVec=[0;0;1];
-aMat=ones(nDims,nPoints);
-timeVec=1:nPoints;
-sTime=1;
-approxType=gras.ellapx.enums.EApproxType.External;
-mArrayList=repmat({repmat(diag([0.1 0.2 0.3]),[1,1,nPoints])},...
- 1,nTubes);
-qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
- 1,nTubes);
-ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
-fromMatMEllTube=gras.ellapx.smartdb.rels.EllTube.fromQMArrays(...
- qArrayList, aMat, mArrayList, timeVec,...
- ltGoodDirArray, sTime, approxType, approxSchemaName,...
- approxSchemaDescr, calcPrecision);
=======================================
---
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromQMScaledArrays.m
Mon Nov 11 04:51:12 2013 UTC
+++ /dev/null
@@ -1,25 +0,0 @@
-% An example of creating nTubes ellipsoid tube objects using
-% fromQMScaledArrays function.
-nPoints=5;
-calcPrecision=0.001;
-approxSchemaDescr=char.empty(1,0);
-approxSchemaName=char.empty(1,0);
-nDims=3;
-nTubes=1;
-lsGoodDirVec=[1;0;1];
-aMat=zeros(nDims,nPoints);
-timeVec=1:nPoints;
-sTime=nPoints;
-approxType=gras.ellapx.enums.EApproxType.Internal;
-mArrayList=repmat({repmat(diag([0.1 0.2 0.3]),[1,1,nPoints])},...
- 1,nTubes);
-qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
- 1,nTubes);
-ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
-scaleFactor = ones(1,nTubes);
-fromQMScaledArraysEllTube = ...
- gras.ellapx.smartdb.rels.EllTube.fromQMScaledArrays(...
- qArrayList,aMat,mArrayList,timeVec,...
- ltGoodDirArray,sTime,approxType,approxSchemaName,...
- approxSchemaDescr,calcPrecision,...
- scaleFactor);
=======================================
---
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_isEqual.m
Mon Nov 11 04:51:12 2013 UTC
+++ /dev/null
@@ -1,29 +0,0 @@
-% An example ISEQUAL function usage. In it two ellipsoid tube objects are
-% created and compared.
-nPoints=5;
-calcPrecision=0.001;
-approxSchemaDescr=char.empty(1,0);
-approxSchemaName=char.empty(1,0);
-nDims=3;
-nTubes=1;
-lsGoodDirVec=[1;0;1];
-aMat=zeros(nDims,nPoints);
-timeVec=1:nPoints;
-sTime=nPoints;
-approxType=gras.ellapx.enums.EApproxType.Internal;
-qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
- 1,nTubes);
-ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
-firstEllTube=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
- qArrayList, aMat, timeVec,...
- ltGoodDirArray, sTime, approxType, approxSchemaName,...
- approxSchemaDescr, calcPrecision);
-lsGoodDirVec=[1;0;0];
-secondEllTube=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
- qArrayList, aMat, timeVec,...
- ltGoodDirArray, sTime, approxType, approxSchemaName,...
- approxSchemaDescr, calcPrecision);
-firstEllTube.isEqual(secondEllTube);
-firstEllTube.isEqual(secondEllTube,'checkFieldOrder',false,...
- 'checkTupleOrder',false,'maxTolerance',0.0001,...
- 'maxRelativeTolerance',0.0001);
=======================================
---
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_projectToOrths.m
Mon Nov 11 04:51:12 2013 UTC
+++ /dev/null
@@ -1,28 +0,0 @@
-% Examples of calculating ellipsoid tube object projection to basic orths
-% using PROJECTTOORTHS function.
-nPoints=5;
-calcPrecision=0.001;
-approxSchemaDescr=char.empty(1,0);
-approxSchemaName=char.empty(1,0);
-nDims=3;
-nTubes=1;
-lsGoodDirVec=[1;0;1];
-aMat=zeros(nDims,nPoints);
-timeVec=1:nPoints;
-sTime=nPoints;
-approxType=gras.ellapx.enums.EApproxType.Internal;
-qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
- 1,nTubes);
-ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
-fromMatEllTube=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
- qArrayList, aMat, timeVec,...
- ltGoodDirArray, sTime, approxType, approxSchemaName,...
- approxSchemaDescr, calcPrecision);
-% Example of projectToOrths usage with one input variable. The defaul value
-% of projection type is used.
-ellTubeProjRel = fromMatEllTube.projectToOrths([1,2]);
-% Example of projectToOrths usage with specified projection type.
-projType = gras.ellapx.enums.EProjType.DynamicAlongGoodCurve;
-ellTubeProjRel = fromMatEllTube.projectToOrths([1,2], projType);
-plObj=smartdb.disp.RelationDataPlotter();
-ellTubeProjRel.plot(plObj);
=======================================
---
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_cut1.m
Sun Feb 23 23:12:29 2014 UTC
+++
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_cut1.m
Mon Feb 24 01:41:07 2014 UTC
@@ -10,7 +10,7 @@
nTubes=1;
lsGoodDirVec=[1;0;1];
aMat=zeros(nDims,nPoints);
-timeVec=(1/nPoints):(1/nPoints):1
+timeVec=(1/nPoints):(1/nPoints):1;
sTime=timeVec(randi(nPoints,1));
approxType=gras.ellapx.enums.EApproxType.Internal;
qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
=======================================
---
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_cut2.m
Sun Feb 23 23:12:29 2014 UTC
+++
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_cut2.m
Mon Feb 24 01:41:07 2014 UTC
@@ -11,7 +11,7 @@
nTubes=1;
lsGoodDirVec=[1;0;1];
aMat=zeros(nDims,nPoints);
-timeVec=(1/nPoints):(1/nPoints):1
+timeVec=(1/nPoints):(1/nPoints):1;
sTime=timeVec(randi(nPoints,1));
approxType=gras.ellapx.enums.EApproxType.Internal;
qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
=======================================
---
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromEllMArray.m
Mon Nov 11 04:51:12 2013 UTC
+++
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromEllMArray.m
Mon Feb 24 01:41:07 2014 UTC
@@ -1,21 +1,27 @@
-nPoints=5;
-calcPrecision=0.001;
-approxSchemaDescr=char.empty(1,0);
-approxSchemaName=char.empty(1,0);
+% An example of creating nTubes ellipsoid tube objects using fromEllMArray
+% function.
+nPoints=10;
+absTol=0.01;
+relTol=0.01;
+approxSchemaDescr='Internal';
+approxSchemaName='Internal';
nDims=3;
nTubes=1;
lsGoodDirVec=[1;0;1];
-timeVec=1:nPoints;
-sTime=nPoints;
+timeVec=(1/nPoints):(1/nPoints):1;
+sTime=timeVec(randi(nPoints,1));
approxType=gras.ellapx.enums.EApproxType.Internal;
+ellArray(nPoints) = ellipsoid();
+aMat=zeros(nDims,nPoints);
+qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},1,1);
+for iElem = 1:nPoints
+ ellArray(iElem) = ellipsoid(aMat(:,iElem), qArrayList{1}(:,:,iElem));
+end;
+ellnArray = repmat(ellArray,nTubes,1);
mArrayList=repmat({repmat(diag([0.1 0.2 0.3]),[1,1,nPoints])},...
1,nTubes);
-ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
-ellArray(nPoints) = ellipsoid();
-arrayfun(@(iElem)gras.ellapx.smartdb.test.examples.fMakeEllArrayElem(iElem),...
- 1:nPoints);
fromEllMArrayEllTube=...
gras.ellapx.smartdb.rels.EllTube.fromEllMArray(...
ellArray, mArrayList{1}, timeVec,...
ltGoodDirArray, sTime, approxType, approxSchemaName,...
- approxSchemaDescr, calcPrecision);
+ approxSchemaDescr, absTol, relTol);
=======================================
---
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromQArrays1.m
Sun Feb 23 23:12:29 2014 UTC
+++
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromQArrays1.m
Mon Feb 24 01:41:07 2014 UTC
@@ -1,5 +1,5 @@
% An example of creating nTubes ellipsoid tube objects using fromQArrays
-% function.
+% function with the same type of approximation.
nPoints=10;
absTol=0.01;
relTol=0.01;
@@ -18,4 +18,4 @@
fromMatEllTube=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
qArrayList, aMat, timeVec,...
ltGoodDirArray, sTime, approxType, approxSchemaName,...
- approxSchemaDescr, absTol, relTol)
+ approxSchemaDescr, absTol, relTol);
=======================================
---
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromQArrays2.m
Sun Feb 23 23:12:29 2014 UTC
+++
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_fromQArrays2.m
Mon Feb 24 01:41:07 2014 UTC
@@ -1,23 +1,23 @@
% An example of creating nTubes ellipsoid tube objects using fromQArrays
-% function.
+% function with different types of approximation.
nPoints=10;
absTol=0.01;
relTol=0.01;
-approxSchemaDescr=['Internal'; 'External'; 'External'];
-approxSchemaName=['Internal'; 'External'; 'External'];
+approxSchemaDescr={'Internal'; 'External'; 'External'};
+approxSchemaName={'Internal'; 'External'; 'External'};
nDims=3;
nTubes=3;
lsGoodDirVec=[1;0;1];
+aMat=zeros(nDims,nPoints);
timeVec=(1/nPoints):(1/nPoints):1;
sTime=timeVec(randi(nPoints,1));
-aMat=zeros(nDims,nPoints);
approxType=[gras.ellapx.enums.EApproxType.Internal,...
- gras.ellapx.enums.EApproxType.Internal,...
- gras.ellapx.enums.EApproxType.Internal]';
-qArrayList=repmat({repmat(diag([0.1 0.2 0.1]),[1,1,nPoints])},...
- 1,nTubes)
+ gras.ellapx.enums.EApproxType.External,...
+ gras.ellapx.enums.EApproxType.External]';
+qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
+ 1,nTubes);
ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
fromMatEllTube=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
qArrayList, aMat, timeVec,...
ltGoodDirArray, sTime, approxType, approxSchemaName,...
- approxSchemaDescr, absTol, relTol)
+ approxSchemaDescr, absTol, relTol);
=======================================
---
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_interp.m
Mon Nov 11 04:51:12 2013 UTC
+++
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_interp.m
Mon Feb 24 01:41:07 2014 UTC
@@ -1,23 +1,25 @@
% An example of usage of INTERP function from EllTubeBasic class. In this
% example an ellipsoid tube object is created, using oldTimeVec time
% vector. Then it is interpolated on newTimeVec time vector.
-nPoints=5;
-calcPrecision=0.001;
-approxSchemaDescr=char.empty(1,0);
-approxSchemaName=char.empty(1,0);
+nPoints=10;
+absTol=0.01;
+relTol=0.01;
+approxSchemaDescr='Internal';
+approxSchemaName='Internal';
nDims=3;
nTubes=1;
lsGoodDirVec=[1;0;1];
aMat=zeros(nDims,nPoints);
-oldTimeVec=1:nPoints;
-sTime=nPoints;
+timeVec=(1/nPoints):(1/nPoints):1;
+sTime=timeVec(randi(nPoints,1));
approxType=gras.ellapx.enums.EApproxType.Internal;
qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
1,nTubes);
ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
fromMatEllTube=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
- qArrayList, aMat, oldTimeVec,...
+ qArrayList, aMat, timeVec,...
ltGoodDirArray, sTime, approxType, approxSchemaName,...
- approxSchemaDescr, calcPrecision);
-newTimeVec = 1:0.5:nPoints;
+ approxSchemaDescr, absTol, relTol);
+newnPoints=100;
+newTimeVec = (1/nPoints):(1/newnPoints):1;
interpEllTube = fromMatEllTube.interp(newTimeVec);
=======================================
---
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_project.m
Sun Feb 23 23:12:29 2014 UTC
+++
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_project.m
Mon Feb 24 01:41:07 2014 UTC
@@ -18,11 +18,11 @@
fromMatEllTube=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
qArrayList, aMat, timeVec,...
ltGoodDirArray, sTime, approxType, approxSchemaName,...
- approxSchemaDescr, absTol, relTol)
+ approxSchemaDescr, absTol, relTol);
projType = gras.ellapx.enums.EProjType.Static;
projMat = [1 0; 0 1; 0 0]';
-p = @gras.ellapx.smartdb.test.examples.fGetProjMat
+p = @gras.ellapx.smartdb.test.examples.fGetProjMat;
[ellTubeProjRel,indProj2OrigVec] = fromMatEllTube.project(projType,...
- {projMat},p)
-plObj=smartdb.disp.RelationDataPlotter()
-ellTubeProjRel.plot(plObj)
+ {projMat},p);
+plObj=smartdb.disp.RelationDataPlotter();
+ellTubeProjRel.plot(plObj);
=======================================
---
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_scale.m
Mon Nov 11 04:51:12 2013 UTC
+++
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_scale.m
Mon Feb 24 01:41:07 2014 UTC
@@ -1,20 +1,22 @@
% An example of using scale function to calculate and set new
% scaleFactor for fields in ellipsoid tube object.
-nPoints=5;
-calcPrecision=0.001;
-approxSchemaDescr=char.empty(1,0);
-approxSchemaName=char.empty(1,0);
+nPoints=10;
+absTol=0.01;
+relTol=0.01;
+approxSchemaDescr='Internal';
+approxSchemaName='Internal';
nDims=3;
nTubes=1;
lsGoodDirVec=[1;0;1];
aMat=zeros(nDims,nPoints);
-timeVec=1:nPoints;
-sTime=nPoints;
+timeVec=(1/nPoints):(1/nPoints):1;
+sTime=timeVec(randi(nPoints,1));
approxType=gras.ellapx.enums.EApproxType.Internal;
-qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},1,nTubes);
+qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
+ 1,nTubes);
ltGoodDirArray=repmat(lsGoodDirVec,[1,nTubes,nPoints]);
-fromMatEllTube=...
- gras.ellapx.smartdb.rels.EllTube.fromQArrays(qArrayList,...
- aMat, timeVec,ltGoodDirArray, sTime, approxType,...
- approxSchemaName, approxSchemaDescr, calcPrecision)
+fromMatEllTube=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
+ qArrayList, aMat, timeVec,...
+ ltGoodDirArray, sTime, approxType, approxSchemaName,...
+ approxSchemaDescr, absTol, relTol);
fromMatEllTube.scale(@(varargin)2,{});
=======================================
---
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_thinOutTuples.m
Mon Nov 11 04:51:12 2013 UTC
+++
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+examples/example_thinOutTuples.m
Mon Feb 24 01:41:07 2014 UTC
@@ -3,15 +3,16 @@
% vector. Then it is thinned out using indVec vector of indices of elements
% from timeVec.
nPoints=10;
-calcPrecision=0.001;
-approxSchemaDescr=char.empty(1,0);
-approxSchemaName=char.empty(1,0);
+absTol=0.01;
+relTol=0.01;
+approxSchemaDescr='Internal';
+approxSchemaName='Internal';
nDims=3;
nTubes=1;
lsGoodDirVec=[1;0;1];
aMat=zeros(nDims,nPoints);
-timeVec=1:nPoints;
-sTime=nPoints;
+timeVec=(1/nPoints):(1/nPoints):1;
+sTime=timeVec(randi(nPoints,1));
approxType=gras.ellapx.enums.EApproxType.Internal;
qArrayList=repmat({repmat(diag([1 2 3]),[1,1,nPoints])},...
1,nTubes);
@@ -19,6 +20,6 @@
fromMatEllTube=gras.ellapx.smartdb.rels.EllTube.fromQArrays(...
qArrayList, aMat, timeVec,...
ltGoodDirArray, sTime, approxType, approxSchemaName,...
- approxSchemaDescr, calcPrecision);
-indVec = [1 2 5 6 8 9 10];
+ approxSchemaDescr, absTol, relTol);
+indVec = randi(nPoints,1,5);
thinOutEllTube = fromMatEllTube.thinOutTuples(indVec);
=======================================
---
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+mlunit/ExamplesTC.m
Mon Nov 11 04:51:12 2013 UTC
+++
/branches/issue_133_aatanesyan/products/+gras/+ellapx/+smartdb/+test/+mlunit/ExamplesTC.m
Mon Feb 24 01:41:07 2014 UTC
@@ -10,20 +10,26 @@
end
%
function test_examples(~)
- gras.ellapx.smartdb.test.examples.example_fromQArrays();
- gras.ellapx.smartdb.test.examples.example_fromQMArrays();
- %gras.ellapx.smartdb.test.examples.example_fromEllArray();
- %gras.ellapx.smartdb.test.examples.example_fromEllMArray();
- gras.ellapx.smartdb.test.examples.example_fromQMScaledArrays();
+ gras.ellapx.smartdb.test.examples.example_fromQArrays1();
+ gras.ellapx.smartdb.test.examples.example_fromQArrays2();
+ gras.ellapx.smartdb.test.examples.example_fromQMArrays1();
+ gras.ellapx.smartdb.test.examples.example_fromQMArrays2();
+ gras.ellapx.smartdb.test.examples.example_fromEllArray();
+ gras.ellapx.smartdb.test.examples.example_fromEllMArray();
+
gras.ellapx.smartdb.test.examples.example_fromQMScaledArrays1();
+
gras.ellapx.smartdb.test.examples.example_fromQMScaledArrays2();
gras.ellapx.smartdb.test.examples.example_project();
- gras.ellapx.smartdb.test.examples.example_projectToOrths();
+ gras.ellapx.smartdb.test.examples.example_projectToOrths1();
+ gras.ellapx.smartdb.test.examples.example_projectToOrths2();
gras.ellapx.smartdb.test.examples.example_scale();
gras.ellapx.smartdb.test.examples.example_interp();
gras.ellapx.smartdb.test.examples.example_thinOutTuples();
- gras.ellapx.smartdb.test.examples.example_cut();
+ gras.ellapx.smartdb.test.examples.example_cut1();
+ gras.ellapx.smartdb.test.examples.example_cut2();
gras.ellapx.smartdb.test.examples.example_fromEllTubes();
gras.ellapx.smartdb.test.examples.example_projectStatic();
- gras.ellapx.smartdb.test.examples.example_isEqual();
+ gras.ellapx.smartdb.test.examples.example_isEqual1();
+ gras.ellapx.smartdb.test.examples.example_isEqual2();
end
end
end
Reply all
Reply to author
Forward
0 new messages