Changes between Version 5 and Version 6 of DataStructures
- Timestamp:
- 07/04/14 11:41:20 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DataStructures
v5 v6 27 27 28 28 /* Returns the type of an element that goes in this seq */ 29 $type $seq_ element_type($seq seq);29 $type $seq_get_element_type($seq seq); 30 30 31 31 /* Returns the seq that is like the given one but with one more … … 44 44 45 45 /* Returns the length of the seq (i.e., the number of elements) */ 46 int $seq_ length($seq seq);46 int $seq_get_length($seq seq); 47 47 48 48 /* Returns the seq that is like the given one but with an element … … 77 77 78 78 /* Returns the cardinality of the set */ 79 int $set_ size($set set);79 int $set_get_size($set set); 80 80 81 81 /* Returns the type of an element that goes in this set */ 82 $type $set_ element_type($set set);82 $type $set_get_element_type($set set); 83 83 84 84 /* Returns the set that is like the given one but with one more … … 115 115 116 116 {{{ 117 /* Returns the empty map with the given key type and 118 * value type. 119 */ 117 120 $map $map_empty($type keyType, $type valType); 118 121 122 /* Returns the map obtained by starting with the given 123 * map, removing the entry with the specified key (if 124 * one exists) and then adding the specified key-value 125 * pair. If that key-value pair already exists in the given map, 126 * the map returned is identical to the given on. 127 */ 119 128 $map $map_put($map map, void * keyPtr, void * valPtr); 120 129 130 /* If an entry with the specified key exists in the map, it 131 * the corresponding value is copied into the region specified 132 * by the resultPtr. Otherwise, a no-op. 133 */ 121 134 void $map_get($map map, void * keyPtr, void * resultPtr); 122 135 136 /* Returns the map obtained by removing an entry 137 * with the specified key, if one exists. 138 */ 123 139 $map $map_removeKey($map map, void * keyPtr); 124 140 125 $set $map_keySet($map map); 141 /* Returns the set of keys in the given map. */ 142 $set $map_get_keySet($map map); 126 143 127 $set $map_entrySet($map map); 128 129 // need a way to get the Keys, at least 144 /* Returns the set of ordered pairs of the form (key,val). 145 * Each ordered pair has a struct type consisting of two fields 146 * named key and val. The type of the key field is the keyType; 147 * the type of the val field is the valType. 148 */ 149 $set $map_get_entrySet($map map); 130 150 }}} 131 151 132
