projectFacetValidityData

PURPOSE ^

project facet validity cones from proper embedding

SYNOPSIS ^

function dec = projectFacetValidityData(dec, facetValidity, mappingMatrix, zerotol)

DESCRIPTION ^

 project facet validity cones from proper embedding

 hProper = mappingMatrix * hNew

 THIS IS NO USER FUNCTION

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function dec = projectFacetValidityData(dec, facetValidity, mappingMatrix, zerotol)
0002 % project facet validity cones from proper embedding
0003 %
0004 % hProper = mappingMatrix * hNew
0005 %
0006 % THIS IS NO USER FUNCTION
0007 
0008 % The elk-library: convex geometry applied to crystallization modeling.
0009 %   Copyright (C) 2013 Alexander Reinhold
0010 %
0011 % This program is free software: you can redistribute it and/or modify it
0012 %   under the terms of the GNU General Public License as published by the
0013 %   Free Software Foundation, either version 3 of the License, or (at your
0014 %   option) any later version.
0015 %
0016 % This program is distributed in the hope that it will be useful, but
0017 %   WITHOUT ANY WARRANTY; without even the implied warranty of
0018 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0019 %   General Public License for more details.
0020 %
0021 % You should have received a copy of the GNU General Public License along
0022 %   with this program.  If not, see <http://www.gnu.org/licenses/>.
0023 
0024 %! DEV: Isn't there a removal of zero-rows after constraint mapping
0025 %       missing?
0026 %/
0027 
0028 %% direct projection
0029 % inequalities (cones) are a simple trnasformation, and the assignement of
0030 %   the constraints to the validity of selected facets is retained.
0031 dec.facetValidityData.A = facetValidity.A * mappingMatrix;
0032 dec.facetValidityData.responsibleMatrix = facetValidity.responsibleMatrix;
0033 % trim contraints (not removing zero-rows)
0034 dec.facetValidityData.A = trimConstraintMatrix(dec.facetValidityData.A, ...
0035     zerotol, 0);
0036 
0037 %% remove redundant rows in A
0038 [dec.facetValidityData.A dumpVector reducedIndexVector] = ...
0039     unique(dec.facetValidityData.A, 'rows');
0040 dec.facetValidityData.responsibleMatrix(:, 1) = reducedIndexVector(...
0041     dec.facetValidityData.responsibleMatrix(:, 1));
0042 
0043 %% remove redundant rows in responsibleMatrix
0044 dec.facetValidityData.responsibleMatrix = unique(...
0045     dec.facetValidityData.responsibleMatrix, 'rows');

Generated on Sat 18-Jul-2015 16:45:31 by m2html © 2005