Ejemplo n.º 1
0
        /// <summary>
        /// Returns the language identifier of non-constant coordinate 'nonConstCoordIdx'.
        /// This is approximately "m" + m_gradeOM + "[" + (m_columnOM + nonConstCoordIdx * domainSize + "]";
        /// </summary>
        /// <param name="nonConstCoordIdx">index of the coordinate (counting only variable coordinates)</param>
        /// <param name="S">The specification (only S.m_coordStorage and S.m_basisVectorNames are used).</param>
        /// <param name="CS">The way coordinates are stored (VARIABLES or ARRAY).</param>
        /// <returns>the language identifier of non-constant coordinate 'nonConstCoordIdx'.</returns>
        public override String GetCoordLangID(int nonConstCoordIdx, Specification S, COORD_STORAGE CS)
        {
            return("m" + m_gradeOM +
                   "[" +
                   m_parentOM.getCoordinateIndex(m_gradeOM, m_columnOM, nonConstCoordIdx) +
//                (m_columnOM + m_parentOM.DomainForGrade(m_gradeOM).Length * nonConstCoordIdx) +
                   "]");
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Returns the language identifier of non-constant coordinate 'nonConstCoordIdx'. Depending
 /// on 'CS', the may be a string like "c[1]" or a string like "e1_e2";
 /// </summary>
 /// <param name="nonConstCoordIdx">index of the coordinate (counting only variable coordinates)</param>
 /// <param name="S">The specification (only S.m_coordStorage and S.m_basisVectorNames are used).</param>
 /// <param name="CS">The way coordinates are stored (VARIABLES or ARRAY).</param>
 /// <returns>the language identifier of non-constant coordinate 'nonConstCoordIdx'.</returns>
 public virtual String GetCoordLangID(int nonConstCoordIdx, Specification S, COORD_STORAGE CS)
 {
     // todo: make adjustment for SMVOM here (or make this function virtual)
     if (CS == COORD_STORAGE.ARRAY)
     {
         string coordArrayName = "c";
         return(coordArrayName + "[" + nonConstCoordIdx + "]");
     }
     else
     {
         return(NonConstBasisBlade(nonConstCoordIdx).ToLangString(S.m_basisVectorNames));
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Constructor which sets up a default specification. Can be used to
        /// construct a specification 'by hand' (i.e, using function calls and setting public
        /// members).
        /// </summary>
        public Specification()
        {
            m_inputDirectory = System.IO.Directory.GetCurrentDirectory();

            InitFloatTypes();
            m_copyright = "";
            m_outputLanguage = OUTPUT_LANGUAGE.NONE;
            m_coordStorage = COORD_STORAGE.ARRAY;
            SetDimension(1);
            InitMetric();
            InitBasisBladeParser();

            System.Console.WriteLine("Specification.Specification(): todo: set members to default values");
        }
Ejemplo n.º 4
0
Archivo: mv.cs Proyecto: Sciumo/gaigen
 /// <summary>
 /// Returns the language identifier of non-constant coordinate 'nonConstCoordIdx'. Depending
 /// on 'CS', the may be a string like "c[1]" or a string like "e1_e2";
 /// </summary>
 /// <param name="nonConstCoordIdx">index of the coordinate (counting only variable coordinates)</param>
 /// <param name="S">The specification (only S.m_coordStorage and S.m_basisVectorNames are used).</param>
 /// <param name="CS">The way coordinates are stored (VARIABLES or ARRAY).</param>
 /// <returns>the language identifier of non-constant coordinate 'nonConstCoordIdx'.</returns>
 public virtual String GetCoordLangID(int nonConstCoordIdx, Specification S, COORD_STORAGE CS)
 {
     // todo: make adjustment for SMVOM here (or make this function virtual)
     if (CS == COORD_STORAGE.ARRAY)
     {
         string coordArrayName = "c";
         return coordArrayName + "[" + nonConstCoordIdx + "]";
     }
     else return NonConstBasisBlade(nonConstCoordIdx).ToLangString(S.m_basisVectorNames);
 }
Ejemplo n.º 5
0
Archivo: mv.cs Proyecto: Sciumo/gaigen
 /// <summary>
 /// Returns the language identifier of non-constant coordinate 'nonConstCoordIdx'. 
 /// This is approximately "m" + m_gradeOM + "[" + (m_columnOM + nonConstCoordIdx * domainSize + "]";
 /// </summary>
 /// <param name="nonConstCoordIdx">index of the coordinate (counting only variable coordinates)</param>
 /// <param name="S">The specification (only S.m_coordStorage and S.m_basisVectorNames are used).</param>
 /// <param name="CS">The way coordinates are stored (VARIABLES or ARRAY).</param>
 /// <returns>the language identifier of non-constant coordinate 'nonConstCoordIdx'.</returns>
 public override String GetCoordLangID(int nonConstCoordIdx, Specification S, COORD_STORAGE CS)
 {
     return "m" + m_gradeOM +
         "[" +
         m_parentOM.getCoordinateIndex(m_gradeOM, m_columnOM, nonConstCoordIdx) +
     //                (m_columnOM + m_parentOM.DomainForGrade(m_gradeOM).Length * nonConstCoordIdx) +
         "]";
 }