statistics.whenHolds
This function gives true when a place has the condition of a dimension. A dimension with no condition is present.
CLI- Package
- @procedures/statistics · README
- Path
["statistics","whenHolds"]- CLI
mark statistics whenHolds --dimension <object | object | object> --values <object>- As data
{"$proc":["statistics","whenHolds"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/statistics/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["statistics","whenHolds"], { dimension: "<dimension>", values: {} });
console.log(JSON.stringify(result));From the command line
$ mark statistics whenHolds --dimension <object | object | object> --values <object>
As data, in a program
{
"$proc": ["statistics", "whenHolds"],
"input": { "dimension": "<dimension>", "values": {} }
}Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
dimension | object | object | object | yes | ||
values | object | yes |
Output
The schema does not list fields (boolean).
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"dimension": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "categorical"
},
"levels": {
"type": "array",
"items": {
"type": "string"
}
},
"id": {
"type": "string",
"description": "The key of the dimension in the values of a point."
},
"label": {
"type": "string",
"description": "The name that a view shows."
},
"unit": {
"type": "string",
"description": "The unit. An empty string means that the dimension has no unit."
},
"when": {
"type": "object",
"properties": {
"dimension": {
"type": "string",
"description": "The id of the parent: a categorical or ordinal dimension with no condition."
},
"levels": {
"type": "array",
"items": {
"type": [
"string",
"number"
]
}
}
},
"required": [
"dimension",
"levels"
],
"additionalProperties": {},
"description": "With this field, a point has a value only at the stated levels of the parent. Each other point has `null`."
}
},
"required": [
"kind",
"levels",
"id",
"label",
"unit"
],
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "continuous"
},
"range": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2,
"maxItems": 2,
"description": "The smallest and the largest value. The first is less than the second."
},
"log": {
"type": "boolean",
"description": "When true, a model and an axis use the base-10 logarithm of the value. All of the range is above 0."
},
"id": {
"type": "string",
"description": "The key of the dimension in the values of a point."
},
"label": {
"type": "string",
"description": "The name that a view shows."
},
"unit": {
"type": "string",
"description": "The unit. An empty string means that the dimension has no unit."
},
"when": {
"type": "object",
"properties": {
"dimension": {
"type": "string",
"description": "The id of the parent: a categorical or ordinal dimension with no condition."
},
"levels": {
"type": "array",
"items": {
"type": [
"string",
"number"
]
}
}
},
"required": [
"dimension",
"levels"
],
"additionalProperties": {},
"description": "With this field, a point has a value only at the stated levels of the parent. Each other point has `null`."
}
},
"required": [
"kind",
"range",
"id",
"label",
"unit"
],
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "ordinal"
},
"levels": {
"anyOf": [
{
"type": "array",
"items": {
"type": "number"
}
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"log": {
"type": "boolean",
"description": "When true, a model uses the base-10 logarithm of the level. The levels are numbers above 0."
},
"id": {
"type": "string",
"description": "The key of the dimension in the values of a point."
},
"label": {
"type": "string",
"description": "The name that a view shows."
},
"unit": {
"type": "string",
"description": "The unit. An empty string means that the dimension has no unit."
},
"when": {
"type": "object",
"properties": {
"dimension": {
"type": "string",
"description": "The id of the parent: a categorical or ordinal dimension with no condition."
},
"levels": {
"type": "array",
"items": {
"type": [
"string",
"number"
]
}
}
},
"required": [
"dimension",
"levels"
],
"additionalProperties": {},
"description": "With this field, a point has a value only at the stated levels of the parent. Each other point has `null`."
}
},
"required": [
"kind",
"levels",
"id",
"label",
"unit"
],
"additionalProperties": {}
}
]
},
"values": {
"type": "object",
"properties": {},
"additionalProperties": {}
}
},
"required": [
"dimension",
"values"
],
"additionalProperties": false
},
"output": {
"type": "boolean"
}
}