示例#1
0
        /// <summary>
        /// Constructor. Do not use directly. Use the constructors of G25.GOM and
        /// G25.SOM instead.
        /// </summary>
        /// <param name="specialized">Whether this is a specialized G25.OM or not.</param>
        /// <param name="name">The name of the outermorphism, for example "om" or "flatPointOM".</param>
        /// <param name="domain">The basis blades of the domain. These are sorted by grade by the constructor.</param>
        /// <param name="range">The basis blades of the range (can be null, then the domain is copied). These are sorted by grade by the constructor.</param>
        /// <param name="spaceDim">The dimension of the space of the algebra (used to know what the maximum grade is).</param>
        protected OM(bool specialized, String name, RefGA.BasisBlade[] domain, RefGA.BasisBlade[] range, int spaceDim)
        {
            m_specialized = specialized;
            m_name        = name;

            m_domain = SortByGrade(domain, spaceDim);
            if (range != null)
            {
                m_range = SortByGrade(range, spaceDim);
            }
            else
            {
                range = domain;
            }

            // initializes one SMV for each domain element
            m_domainSmv = new SMVOM[m_domain.Length][];
            for (int g = 0; g < m_domainSmv.Length; g++)
            {
                m_domainSmv[g] = new SMVOM[m_domain[g].Length];
                for (int c = 0; c < m_domain[g].Length; c++)
                {
                    string smvName = name + "_smv_grade_" + g + "_column_" + c;
                    m_domainSmv[g][c] = new SMVOM(smvName, m_range[g], this, g, c);
                }
            }

            m_domainVectors = GetVectors(m_domain, null);
            m_rangeVectors  = GetVectors(m_domain, "c");
        } // end of OM constructor
示例#2
0
文件: om.cs 项目: Sciumo/gaigen
        /// <summary>
        /// Constructor. Do not use directly. Use the constructors of G25.GOM and
        /// G25.SOM instead.
        /// </summary>
        /// <param name="specialized">Whether this is a specialized G25.OM or not.</param>
        /// <param name="name">The name of the outermorphism, for example "om" or "flatPointOM".</param>
        /// <param name="domain">The basis blades of the domain. These are sorted by grade by the constructor.</param>
        /// <param name="range">The basis blades of the range (can be null, then the domain is copied). These are sorted by grade by the constructor.</param>
        /// <param name="spaceDim">The dimension of the space of the algebra (used to know what the maximum grade is).</param>
        protected OM(bool specialized, String name, RefGA.BasisBlade[] domain, RefGA.BasisBlade[] range, int spaceDim)
        {
            m_specialized = specialized;
            m_name = name;

            m_domain = SortByGrade(domain, spaceDim);
            if (range != null) m_range = SortByGrade(range, spaceDim);
            else range = domain;

            // initializes one SMV for each domain element
            m_domainSmv = new SMVOM[m_domain.Length][];
            for (int g = 0; g < m_domainSmv.Length; g++)
            {
                m_domainSmv[g] = new SMVOM[m_domain[g].Length];
                for (int c = 0; c < m_domain[g].Length; c++)
                {
                    string smvName = name + "_smv_grade_" + g + "_column_" + c;
                    m_domainSmv[g][c] = new SMVOM(smvName, m_range[g], this, g, c);
                }
            }

            m_domainVectors = GetVectors(m_domain, null);
            m_rangeVectors = GetVectors(m_domain, "c");
        }