Skip to content
  • Mark OLESEN's avatar
    ENH: add expression support for scalar/vector expression lookups · fc6239d9
    Mark OLESEN authored
    - similar idea to swak timelines/lookuptables but combined together
      and based on Function1 for more flexibility.
    
      Specified as 'functions<scalar>' or 'functions<vector>'.
      For example,
    
      functions<scalar>
      {
          intakeType table ((0 0) (10 1.2));
    
          p_inlet
          {
              type        sine;
              frequency   3000;
              scale       50;
              level       101325;
          }
      }
    
      These can be referenced in the expressions as a nullary function or a
      unary function.
    
      Within the parser, the names are prefixed with "fn:" (function).
      It is thus possible to define "fn:sin()" that is different than
      the builtin "sin()" function.
    
         * A nullary call uses time value
           - Eg, fn:p_inlet()
    
         * A unary call acts as a remapper function.
           - Eg, fn:intakeType(6.25)
    fc6239d9