Changes between Initial Version and Version 1 of Ticket #4398, comment 20


Ignore:
Timestamp:
2017-10-25T17:41:10Z (7 years ago)
Author:
Francesco Casella

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4398, comment 20

    initial v1  
    55I'm not sure I understand why this should be useful to remove common subexpressions.
    66
    7 I thought that CSE would basically require to build an ordered list or hash table of sub-expressions as they are encountered while parsing the DAEs, replacing any instance of an already encountered expression with an auxiliary variable. For a model with N equations each containing at most K sub-expressions this would be O(N log(N)) if an ordered list is used, or O(N) if a hash table is used. Do I miss something?
     7I thought that CSE would basically require to build a binary tree or hash table of sub-expressions as they are encountered while parsing the DAEs, replacing any instance of an already encountered expression with an auxiliary variable. For a model with N equations each containing at most K sub-expressions this would be O(N log(N)) if a binary tree is used, or O(N) if a hash table is used. Do I miss something?