private GaSymOutermorphism(ISymbolicMatrix vectorsMappingMatrix, GaSymMapUnilinear multivectorsMap, GaUnilinearMapImplementation multivectorsMappingKind) { _multivectorsMap = multivectorsMap; VectorsMappingMatrix = vectorsMappingMatrix; MultivectorsMappingKind = multivectorsMappingKind; }
public static GaNumOutermorphism Create(Matrix vectorsMappingMatrix, GaUnilinearMapImplementation multivectorsMappingKind) { if (multivectorsMappingKind == GaUnilinearMapImplementation.Identity) { var vSpaceDim = vectorsMappingMatrix.ColumnCount; return(new GaNumOutermorphism( DenseMatrix.CreateIdentity(vSpaceDim), GaNumMapUnilinearIdentity.Create(vSpaceDim), GaUnilinearMapImplementation.Identity )); } var mvMappingDictionaryDict = vectorsMappingMatrix.ToOutermorphismDictionary(); GaNumMapUnilinear multivectorsMap; switch (multivectorsMappingKind) { case GaUnilinearMapImplementation.Array: multivectorsMap = mvMappingDictionaryDict.ToArrayMap( vectorsMappingMatrix.ColumnCount, vectorsMappingMatrix.RowCount ); break; case GaUnilinearMapImplementation.Hash: multivectorsMap = mvMappingDictionaryDict.ToHashMap( vectorsMappingMatrix.ColumnCount, vectorsMappingMatrix.RowCount ); break; case GaUnilinearMapImplementation.Matrix: multivectorsMap = mvMappingDictionaryDict.ToMatrixMap( vectorsMappingMatrix.ColumnCount, vectorsMappingMatrix.RowCount ); break; case GaUnilinearMapImplementation.CoefSums: multivectorsMap = mvMappingDictionaryDict.ToCoefSumsMap( vectorsMappingMatrix.ColumnCount, vectorsMappingMatrix.RowCount ); break; default: multivectorsMap = mvMappingDictionaryDict.ToTreeMap( vectorsMappingMatrix.ColumnCount, vectorsMappingMatrix.RowCount ); break; } return(new GaNumOutermorphism( vectorsMappingMatrix, multivectorsMap, multivectorsMappingKind )); }