Exemplo n.º 1
0
        public static IGaNumMultivectorTemp AddFactors(this IGaNumMultivectorTemp tempMv, double scalar, IGaNumMultivectorTemp termsMv)
        {
            foreach (var term in termsMv.NonZeroTerms)
            {
                tempMv.AddFactor(term.Key, term.Value * scalar);
            }

            return(tempMv);
        }
Exemplo n.º 2
0
        public static IGaNumMultivectorTemp AddFactors(this IGaNumMultivectorTemp tempMv, double scalar, IEnumerable <KeyValuePair <int, double> > terms)
        {
            foreach (var term in terms)
            {
                tempMv.AddFactor(term.Key, term.Value * scalar);
            }

            return(tempMv);
        }
Exemplo n.º 3
0
        public static IGaNumMultivectorTemp AddFactors(this IGaNumMultivectorTemp tempMv, IEnumerable <GaNumMultivectorBiTerm> biTerms, GaNumMetricOrthogonal orthogonalMetric)
        {
            foreach (var biTerm in biTerms)
            {
                tempMv.AddFactor(
                    biTerm.IdXor,
                    biTerm.IsNegativeEGp,
                    biTerm.TotalProduct * biTerm.Value2 * orthogonalMetric[biTerm.IdAnd]
                    );
            }

            return(tempMv);
        }
Exemplo n.º 4
0
        public static IGaNumMultivectorTemp AddFactors(this IGaNumMultivectorTemp tempMv, IEnumerable <GaNumMultivectorBiTerm> biTerms)
        {
            foreach (var biTerm in biTerms)
            {
                tempMv.AddFactor(
                    biTerm.IdXor,
                    biTerm.IsNegativeEGp,
                    biTerm.TotalProduct
                    );
            }

            return(tempMv);
        }