Skip to content
Fourohtwo

datenvertrag.halowerk.com/v1/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

BaseAnswering
POSThttps://datenvertrag.halowerk.com/v1/line-mass-transport-audit

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://datenvertrag.halowerk.com/v1/line-mass-transport-audit", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"claimed_value":{"cdf_segments":[{"cost":1,"left":0,"mass_imbalance":1,"right":1},{"cost":2,"left":1,"mass_imbalance":2,"right":2},{"cost":1,"left":2,"mass_imbalance":1,"right":3}],"normalized_wasserstein":"2/1","plan":[[1,0],[0,1]],"total_mass":2,"transport_cost":4},"source":[{"mass":1,"position":0},{"mass":1,"position":1}],"target":[{"mass":1,"position":2},{"mass":1,"position":3}]}),
});
console.log(await res.json());

Example input

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