MCPcopy Create free account
hub / github.com/apache/arrow / garrow_equal_options_class_init

Function garrow_equal_options_class_init

c_glib/arrow-glib/basic-array.cpp:300–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300static void
301garrow_equal_options_class_init(GArrowEqualOptionsClass *klass)
302{
303 auto gobject_class = G_OBJECT_CLASS(klass);
304 gobject_class->finalize = garrow_equal_options_finalize;
305 gobject_class->set_property = garrow_equal_options_set_property;
306 gobject_class->get_property = garrow_equal_options_get_property;
307
308 auto options = arrow::EqualOptions::Defaults();
309 GParamSpec *spec;
310 /**
311 * GArrowEqualOptions:approx:
312 *
313 * Whether or not approximate comparison is used.
314 *
315 * Since: 5.0.0
316 */
317 spec = g_param_spec_boolean("approx",
318 "Approx",
319 "Whether or not approximate comparison is used",
320 FALSE,
321 static_cast<GParamFlags>(G_PARAM_READWRITE));
322 g_object_class_install_property(gobject_class, PROP_APPROX, spec);
323
324 /**
325 * GArrowEqualOptions:nans-equal:
326 *
327 * Whether or not NaNs are considered equal.
328 *
329 * Since: 5.0.0
330 */
331 spec = g_param_spec_boolean("nans-equal",
332 "NaNs equal",
333 "Whether or not NaNs are considered equal",
334 options.nans_equal(),
335 static_cast<GParamFlags>(G_PARAM_READWRITE));
336 g_object_class_install_property(gobject_class, PROP_NANS_EQUAL, spec);
337
338 /**
339 * GArrowEqualOptions:absolute-tolerance:
340 *
341 * The absolute tolerance for approximate comparison of
342 * floating-point values.
343 *
344 * Since: 5.0.0
345 */
346 spec = g_param_spec_double("absolute-tolerance",
347 "Absolute tolerance",
348 "The absolute tolerance for approximate comparison "
349 "of floating-point values",
350 -G_MAXDOUBLE,
351 G_MAXDOUBLE,
352 options.atol().has_value() ? *options.atol() : 0.0,
353 static_cast<GParamFlags>(G_PARAM_READWRITE));
354 g_object_class_install_property(gobject_class, PROP_ABSOLUTE_TOLERANCE, spec);
355}
356
357/**

Callers

nothing calls this directly

Calls 1

DefaultsFunction · 0.50

Tested by

no test coverage detected