Пример #1
0
        private Tuple <long, long, long> OpSparseTableSize()
        {
            var table      = GaNumMapBilinearHash.CreateFromOuterProduct(Frame);
            var tableSize  = table.SizeInBytes();
            var mvCount    = table.TargetMultivectorsCount;
            var termsCount = table.TargetMultivectorTermsCount;

            return(new Tuple <long, long, long>(
                       tableSize,
                       mvCount,
                       termsCount
                       ));
        }
Пример #2
0
        public static GaNumMapBilinearHash ToHashMap(this IGaNumMapBilinear bilinearMap)
        {
            var resultMap = GaNumMapBilinearHash.Create(
                bilinearMap.DomainVSpaceDimension,
                bilinearMap.TargetVSpaceDimension
                );

            foreach (var basisBladeMapping in bilinearMap.BasisBladesMaps())
            {
                var id1 = basisBladeMapping.Item1;
                var id2 = basisBladeMapping.Item2;
                var mv  = basisBladeMapping.Item3;

                resultMap.SetBasisBladesMap(id1, id2, mv);
            }

            return(resultMap);
        }