Ultra 0.9.4
Loading...
Searching...
No Matches
problem.cc File Reference

Namespaces

namespace  ultra

Functions

bool ultra::src::internal::compatible (const function::param_data_types &instance, const std::vector< std::string > &pattern, const columns_info &columns)

Detailed Description

Remarks
This file is part of ULTRA.
License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/

Function Documentation

◆ compatible()

bool ultra::src::internal::compatible ( const function::param_data_types & instance,
const std::vector< std::string > & pattern,
const columns_info & columns )

Checks if a sequence of categories matches a pattern of category names and/or domain names.

Parameters
[in]instancea sequence of categories
[in]patterna mixed vector of category names and domain names
Returns
true if instance matches pattern

For instance:

category_t km_h, name;
compatible({km_h}, {"km/h"}) == true
compatible({km_h}, {"numeric"}) == true
compatible({km_h}, {"string"}) == false
compatible({km_h}, {"name"}) == false
compatible({name}, {"string"}) == true
Warning
Column names that coincide with domain identifiers (such as "numeric", "string", or "integer") cannot be distinguished from domain specifications and will always be interpreted as domains.