Zum Inhalt
HALOWERK

Datenvertragswerk

palindromic occurrence tree audit

For supplied0..32 numeric symbols0..2, constructs every distinct nonempty palindromic factor with its full tokenword, longestproper palindromesuffix link, all inclusive0based occurrence endindices and labeled wraptransitions. Returns longest palindromesuffix node of each nonempty prefix. Canonical nodes0imaginarylength-1 and1emptylength0, remaining sortedby length/tokenlex; roots have no occurrences. Whole claimednodes and prefixvector compared, including zeros/links/positions rather than.

POST https://datenvertrag.halowerk.com/v1/palindromic-occurrence-tree-audit

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
tokensarrayJa
claimedSiehe SchemaJa
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "properties": {
    "tokens": {
      "type": "array",
      "maxItems": 32,
      "items": {
        "anyOf": [
          {
            "type": "integer",
            "minimum": 0,
            "maximum": 2
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "claimed": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "nodes": {
              "type": "array",
              "maxItems": 34,
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 33
                  },
                  "length": {
                    "type": "integer",
                    "minimum": -1,
                    "maximum": 32
                  },
                  "tokens": {
                    "type": "array",
                    "maxItems": 32,
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2
                    }
                  },
                  "suffix_link": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 33
                  },
                  "occurrences": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 32
                  },
                  "end_indices": {
                    "type": "array",
                    "maxItems": 32,
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 31
                    }
                  },
                  "transitions": {
                    "type": "array",
                    "maxItems": 3,
                    "items": {
                      "type": "object",
                      "properties": {
                        "symbol": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2
                        },
                        "target": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 33
                        }
                      },
                      "required": [
                        "symbol",
                        "target"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "id",
                  "length",
                  "tokens",
                  "suffix_link",
                  "occurrences",
                  "end_indices",
                  "transitions"
                ],
                "additionalProperties": false
              }
            },
            "prefix_suffix_nodes": {
              "type": "array",
              "maxItems": 32,
              "items": {
                "type": "integer",
                "minimum": 0,
                "maximum": 33
              }
            }
          },
          "required": [
            "nodes",
            "prefix_suffix_nodes"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "tokens",
    "claimed"
  ],
  "additionalProperties": false
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "tokens": [
    0,
    1,
    0
  ],
  "claimed": {
    "nodes": [
      {
        "id": 0,
        "length": -1,
        "tokens": [],
        "suffix_link": 0,
        "occurrences": 0,
        "end_indices": [],
        "transitions": [
          {
            "symbol": 0,
            "target": 2
          },
          {
            "symbol": 1,
            "target": 3
          }
        ]
      },
      {
        "id": 1,
        "length": 0,
        "tokens": [],
        "suffix_link": 0,
        "occurrences": 0,
        "end_indices": [],
        "transitions": []
      },
      {
        "id": 2,
        "length": 1,
        "tokens": [
          0
        ],
        "suffix_link": 1,
        "occurrences": 2,
        "end_indices": [
          0,
          2
        ],
        "transitions": []
      },
      {
        "id": 3,
        "length": 1,
        "tokens": [
          1
        ],
        "suffix_link": 1,
        "occurrences": 1,
        "end_indices": [
          1
        ],
        "transitions": [
          {
            "symbol": 0,
            "target": 4
          }
        ]
      },
      {
        "id": 4,
        "length": 3,
        "tokens": [
          0,
          1,
          0
        ],
        "suffix_link": 2,
        "occurrences": 1,
        "end_indices": [
          2
        ],
        "transitions": []
      }
    ],
    "prefix_suffix_nodes": [
      2,
      3,
      4
    ]
  }
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-07, 02:42 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →