mapToExtendedEmbedding

PURPOSE ^

map hC-vector to the extended embedding

SYNOPSIS ^

function heMatrix = mapToExtendedEmbedding(hcMatrix, dec, zerotol,partitionVector)

DESCRIPTION ^

 map hC-vector to the extended embedding

 Syntax: heMatrix = convertToProperEmbedding(hcMatrix, dec)

 With mapToExtendedEmbedding(.., zerotol, partitionVector), the tolerance
   can be set and the unified partitions in the extended embeding can
   be provided. Both are optional arguments.

 See also: computeExtendedEmbedding, approximateDec

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function heMatrix = mapToExtendedEmbedding(hcMatrix, dec, zerotol, ...
0002     partitionVector)
0003 % map hC-vector to the extended embedding
0004 %
0005 % Syntax: heMatrix = convertToProperEmbedding(hcMatrix, dec)
0006 %
0007 % With mapToExtendedEmbedding(.., zerotol, partitionVector), the tolerance
0008 %   can be set and the unified partitions in the extended embeding can
0009 %   be provided. Both are optional arguments.
0010 %
0011 % See also: computeExtendedEmbedding, approximateDec
0012 
0013 % The elk-library: convex geometry applied to crystallization modeling.
0014 %   Copyright (C) 2013 Alexander Reinhold
0015 %
0016 % This program is free software: you can redistribute it and/or modify it
0017 %   under the terms of the GNU General Public License as published by the
0018 %   Free Software Foundation, either version 3 of the License, or (at your
0019 %   option) any later version.
0020 %
0021 % This program is distributed in the hope that it will be useful, but
0022 %   WITHOUT ANY WARRANTY; without even the implied warranty of
0023 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0024 %   General Public License for more details.
0025 %
0026 % You should have received a copy of the GNU General Public License along
0027 %   with this program.  If not, see <http://www.gnu.org/licenses/>.
0028 
0029 if ~exist('zerotol', 'var') || isempty(zerotol)
0030     zerotol = elkZerotol;
0031 end
0032 if ~exist('partitionVector', 'var') || isempty(partitionVector)
0033     partitionVector = computePartitionIndexDec(dec.originalData, ...
0034         hcMatrix, zerotol, 1);
0035 end
0036 
0037 % the maping information is already present in dec.originalData and we can
0038 %   cycle through the unified partitions.
0039 heMatrix = zeros(dec.nC, size(hcMatrix, 2));
0040 for iPart = 1:dec.originalData.nPU
0041     thisFilter = partitionVector == iPart;
0042     
0043     heMatrix(:, thisFilter) = dec.originalData.mappingOriginalToNewList{...
0044         iPart} * hcMatrix(:, thisFilter);
0045 end

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