/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to libssts/Matrix.h

  • Committer: Gustav Hartvigsson
  • Date: 2016-01-30 21:23:29 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20160130212329-cjpxy0vn851li8f3
* added S_EXPERTED to public functions.
* renamed -  internal_s_box_set_err_on_missmatch () to _internal_s_box_set_err_on_missmatch ().
* Replaced some tabs with spaces.

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
 * @param height The initial height of the matrix. The initial number of rows
83
83
 *               the matrix has.
84
84
 */
 
85
S_EXPORTED
85
86
SMatrix *
86
87
s_matrix_new (size_t width,
87
88
              size_t height,
93
94
 * @param self The SMatrix to free.
94
95
 * @param free_data Should the data also be freed with the data structure?
95
96
 */
 
97
S_EXPORTED
96
98
void
97
99
s_matrix_free (SMatrix * self, sboolean free_data);
98
100
 
105
107
 * @note You need to free the old SMatrix yourself
106
108
 * <em>(but not the data stored)</em>, this is to avoid memory leaks.
107
109
 */
 
110
S_EXPORTED
108
111
SMatrix *
109
112
s_matrix_realloc (SMatrix * self,
110
113
                  size_t width,
115
118
 *
116
119
 * Equivalent to matrix[x][y] would be in static 2d arrays.
117
120
 */
 
121
S_EXPORTED
118
122
spointer
119
123
s_matrix_get (SMatrix * self,
120
124
              size_t x,
130
134
 *
131
135
 * @note The value way be wrong.
132
136
 */
 
137
S_EXPORTED
133
138
size_t
134
139
s_matrix_get_last_tuple_n (SMatrix self);
135
140
 
143
148
 *          (What position in the tuple to put it in).
144
149
 * @param data The data to be placed in the SMatrix.
145
150
 */
 
151
S_EXPORTED
146
152
void
147
153
s_matrix_set (SMatrix * self,
148
154
              size_t x,
159
165
 *
160
166
 * @see s_matrix_get_tuple_as_dynamic_array()
161
167
 */
 
168
S_EXPORTED
162
169
spointer *
163
170
s_matrix_get_tuple (SMatrix * self,
164
171
                    size_t x);
175
182
 *       during construction or reallocation. Any dangling pointers will
176
183
 *       <em>not</em> be freed.
177
184
 */
 
185
S_EXPORTED
178
186
void
179
187
s_matrix_append (SMatrix * self,
180
188
                 spointer * tuple);
189
197
 *
190
198
 * @see s_matrix_get_tuple
191
199
 */
 
200
S_EXPORTED
192
201
SDynamicArray *
193
202
s_matrix_get_tuple_as_dynamic_array (SMatrix * self,
194
203
                                     size_t x);
197
206
 * This iterates over each tuple. giving the tuple as the item in the
198
207
 * callback function.
199
208
 */
 
209
S_EXPORTED
200
210
void
201
211
s_matrix_for_each (SMatrix * self,
202
212
                  ForEachFunc callback,
241
251
}
242
252
 @endcode
243
253
 */
 
254
S_EXPORTED
244
255
char *
245
256
s_matrix_serialize_json (SMatrix * self);
246
257
 
258
269
 * @note As with s_matrix_serialize_json(), only primative types work. Complex
259
270
 * types will not work.
260
271
 */
 
272
S_EXPORTED
261
273
void
262
274
s_matrix_deserialize_json (SMatrix * self,
263
275
                           const schar * data);