| OCR Text |
Show 65 max_vertex ( max_occurrence, new_cap, max_at_X, new_X) max_ vertex ( max_occurrence, new_cap, max_at_ Y, new_ Y)) function find_max ( a , b ) { if ( a> b ) return a ; return b ; } function max_ vertex (a, b, c, d) { if (a> b) return c; return d ; } The local variables available in this inner loop statement are name1 and name2, which are the identifiers for two nodes; new_cap, which holds the new capacitance; and new_X and new_ Y, which are the coordinates of the capacitance. Here is the function of this statement: 1. ACRE looks up the definition of cap_dbase and find that it has 2 keys. It evaluates the first two expressions in the argument list. 2. ACRE looks up a record for node1 and node2. 3. The five variables 'capacitance', 'count_of_occurrences', 'max_occurrence', 'max_at_X', and 'max_at_ Y' are given valid values. 4. The five remaining expressions are evaluated to form a list to update the record. As a part of this, 'find_max' is called once and 'max_vertex' is called twice. 5. The record is updated and the seven names which made up the record are made available in a global scope with the new values. The names are made unique with the name of the database and a colon prepended to each. For example, 'node1' is now globally available as 'cap_dbase:node1'. A conventional approach to this would see a 'get' statement for a database access to read the record, then a series of statements to update the |