Constructor

NumCosmoHaloCatalognew

Declaration [src]

NcHaloCatalog*
nc_halo_catalog_new (
  NcHaloCatalogKind kind,
  const gchar* id_col,
  const gchar* parent_id_col,
  guint nrows,
  GStrv col_names,
  const NcmCatalogColType* col_types,
  guint n_types
)

Description [src]

Creates a new NcHaloCatalog with nrows rows and the columns named by col_names, all values initialized to zero. id_col and parent_id_col, when given, name the columns used to follow the linkage between catalogs.

Parameters

kind

Type: NcHaloCatalogKind

The NcHaloCatalogKind of the catalog.

id_col

Type: const gchar*

The name of the id column, or NULL.

The argument can be NULL.
The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
parent_id_col

Type: const gchar*

The name of the parent id column, or NULL.

The argument can be NULL.
The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
nrows

Type: guint

The number of rows.

col_names

Type: An array of utf8

The column names.

The array must be NULL-terminated.
Each element is a NUL terminated UTF-8 string.
col_types

Type: An array of NcmCatalogColType

The per-column logical types, or NULL for all-double.

The argument can be NULL.
The length of the array is specified in the n_types argument.
The data is owned by the caller of the function.
n_types

Type: guint

The number of entries in col_types.

Return value

Type: NcHaloCatalog

A new NcHaloCatalog.

The caller of the function takes ownership of the data, and is responsible for freeing it.