Zum Inhalt
HALOWERK

Datenvertragswerk

line mass transport audit

For two strictly position-sorted positive-integer mass histograms with1..8bins, coordinates-32..32 and equal totalmass1..32, construct the full canonical monotone quantile coupling matrix. Return raw mass-times-distance L1cost, reduced rational normalized W1 and every interval of the absolute-CDF-imbalance cost witness. Compare the whole supplied canonical artifact by fieldname with ordered matrix/segment arrays. Other equallyoptimal nonmonotone L1plans can exist and are not accepted as this.

POST https://datenvertrag.halowerk.com/v1/line-mass-transport-audit

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
sourceSiehe SchemaJa
targetSiehe SchemaJa
claimed_valueSiehe SchemaJa
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "properties": {
    "source": {
      "anyOf": [
        {
          "type": "array",
          "minItems": 1,
          "maxItems": 8,
          "items": {
            "type": "object",
            "properties": {
              "position": {
                "type": "integer",
                "minimum": -32,
                "maximum": 32
              },
              "mass": {
                "type": "integer",
                "minimum": 1,
                "maximum": 32
              }
            },
            "required": [
              "position",
              "mass"
            ],
            "additionalProperties": false
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "target": {
      "anyOf": [
        {
          "type": "array",
          "minItems": 1,
          "maxItems": 8,
          "items": {
            "type": "object",
            "properties": {
              "position": {
                "type": "integer",
                "minimum": -32,
                "maximum": 32
              },
              "mass": {
                "type": "integer",
                "minimum": 1,
                "maximum": 32
              }
            },
            "required": [
              "position",
              "mass"
            ],
            "additionalProperties": false
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "claimed_value": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "plan": {
              "type": "array",
              "maxItems": 8,
              "items": {
                "type": "array",
                "maxItems": 8,
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 32
                }
              }
            },
            "total_mass": {
              "type": "integer",
              "minimum": 1,
              "maximum": 32
            },
            "transport_cost": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4096
            },
            "normalized_wasserstein": {
              "type": "string",
              "maxLength": 20,
              "pattern": "^(0|[1-9][0-9]*)/[1-9][0-9]*$"
            },
            "cdf_segments": {
              "type": "array",
              "maxItems": 15,
              "items": {
                "type": "object",
                "properties": {
                  "left": {
                    "type": "integer",
                    "minimum": -32,
                    "maximum": 32
                  },
                  "right": {
                    "type": "integer",
                    "minimum": -32,
                    "maximum": 32
                  },
                  "mass_imbalance": {
                    "type": "integer",
                    "minimum": -32,
                    "maximum": 32
                  },
                  "cost": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4096
                  }
                },
                "required": [
                  "left",
                  "right",
                  "mass_imbalance",
                  "cost"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "plan",
            "total_mass",
            "transport_cost",
            "normalized_wasserstein",
            "cdf_segments"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "source",
    "target",
    "claimed_value"
  ],
  "additionalProperties": false
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "source": [
    {
      "position": 0,
      "mass": 1
    },
    {
      "position": 1,
      "mass": 1
    }
  ],
  "target": [
    {
      "position": 2,
      "mass": 1
    },
    {
      "position": 3,
      "mass": 1
    }
  ],
  "claimed_value": {
    "plan": [
      [
        1,
        0
      ],
      [
        0,
        1
      ]
    ],
    "total_mass": 2,
    "transport_cost": 4,
    "normalized_wasserstein": "2/1",
    "cdf_segments": [
      {
        "left": 0,
        "right": 1,
        "mass_imbalance": 1,
        "cost": 1
      },
      {
        "left": 1,
        "right": 2,
        "mass_imbalance": 2,
        "cost": 2
      },
      {
        "left": 2,
        "right": 3,
        "mass_imbalance": 1,
        "cost": 1
      }
    ]
  }
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-05, 03:23 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →