Skip to content

feat(regions)!: remove the degenerate region samplers, add InfraSupport - #30

Open
p135246 wants to merge 3 commits into
mainfrom
work/RegionSamplers
Open

p135246 wants to merge 3 commits into
mainfrom
work/RegionSamplers

Conversation

@p135246

@p135246 p135246 commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Why

A RandomInfra... sampler exists for a head whose family has more than one member. A region head (ball, shell, tube, cylinder, cone, solid of revolution, ball hull, convex hull, quadric) has exactly one member, its vertex set: "Cardinality" is the constant 1, so RandomInfraBall[g, ball] returned the support with no randomness and RandomInfraBall[g, ball, 2] returned {}. Random points in a region are already RandomInfraPoint[g, region, n], the counterpart of RandomPoint[region, n].

What

  • Breaking (2.8.0): RandomInfraBall, RandomInfraShell, RandomInfraTube, RandomInfraCylinder, RandomInfraCone, RandomInfraSolidOfRevolution, RandomInfraBallHull, RandomInfraConvexHull, RandomInfraQuadric removed without an alias (export, definitions, usage, reference page, guide chips, tutorial, SeeAlso entries, sampler-shape tests). RandomInfraPlane stays: the separating sets of a plane are a family.
  • New reader InfraSupport[graph, head]: Keys @ InfraMeasurement[graph, head, "VertexDensity"], the sorted vertex list the members of any head pass through; a List of heads maps. Reference page, guide bullet, tests.
  • The scene engine, the multiway explorer and the substrate highlighter resolve a region token through InfraSupport; bound values unchanged.
  • Fix: the generic "Cardinality", "Length", "VertexDensity", "EdgeDensity" and InfraMemberQ clauses of InfraMeasurement apply only when the head has a "Graph" reading, and "Subgraph", "CountingMeasure", "RiemannianMeasure" only when it has a "VertexDensity". An unknown property of a head that defines its readings by UpValues (a sister paclet's heads) stays unevaluated and silent instead of emitting VertexList::graph and Table::iterb. Test with a density-only dummy head.
  • CHANGELOG 2.8.0 with the Earlier | Now table; PacletInfo.wl 2.8.0.
  • Rebuilt the 41 documentation notebooks whose Markdown source changed plus InfraSupport.nb; build_docs.wls: 0 dead links in sources and built pages, 291 Build.

Verification

  • run_tests.wls: 2460/2460 before, 2464/2464 after (67 files, 0 failures).
  • Probe: 275 exports, every export has a usage line and a docs/Symbols page and vice versa; Names["WolframInstituteInfraGeometryRandomInfra*"] contains none of the removed names; InfraSupport[g, InfraBall[c, 2]] === Keys @ InfraMeasurement[g, InfraBall[c, 2], "VertexDensity"] on GridGraph[{5, 5}]; the unknown-property calls leave $MessageList empty.

Migration

Earlier Now
RandomInfraBall[g, InfraBall[c, r]], RandomInfraBall[g, c, r] InfraSupport[g, InfraBall[c, r]]
RandomInfraBall[g, ball, All] {InfraSupport[g, ball]}
RandomInfraBall[g, ball, n] meant as random points RandomInfraPoint[g, ball, n]
the other region samplers, head or bare form InfraSupport[g, Infra<Region>[...]]

p135246 and others added 3 commits October 18, 2026 22:20
InfraSupport[graph, head] is the sorted vertex list the members of any
head pass through, Keys @ InfraMeasurement[graph, head, "VertexDensity"];
a List of heads maps. It is the reader a region keeps when its
degenerate sampler goes.

The generic "Cardinality", "Length", "VertexDensity", "EdgeDensity" and
InfraMemberQ clauses apply only when the head has a "Graph" reading, and
"Subgraph", "CountingMeasure", "RiemannianMeasure" only when it has a
"VertexDensity": an unknown property of a head that defines its readings
by UpValues now stays unevaluated and silent instead of emitting
VertexList::graph and Table::iterb.

Co-Authored-By: Claude <noreply@anthropic.com>
RandomInfraBall, RandomInfraShell, RandomInfraTube, RandomInfraCylinder,
RandomInfraCone, RandomInfraSolidOfRevolution, RandomInfraBallHull,
RandomInfraConvexHull and RandomInfraQuadric sampled a family of one
member: their "Cardinality" is the constant 1, so the count-less call
returned the support and any count above one returned {}. A
RandomInfra... sampler is for a genuine family; a region's one member is
InfraSupport[graph, head] and its random points are
RandomInfraPoint[graph, region, n]. RandomInfraPlane stays, the
separating sets of a plane being a family.

The scene engine, the multiway explorer and the substrate highlighter
resolve a region token through InfraSupport; tests and pages that used
a sampler to read a support now read it, the sampler-shape tests go.

BREAKING CHANGE: the nine region samplers are removed without an alias;
see the CHANGELOG table for the replacements.

Co-Authored-By: Claude <noreply@anthropic.com>
The 41 reference, guide and tutorial pages whose Markdown source changed,
and the new InfraSupport page; build_docs.wls reports 0 dead links in the
sources and in the built pages, 291 Build.

Co-Authored-By: Claude <noreply@anthropic.com>
@p135246

p135246 commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

Not merging this for now: the uncommitted work in the dev repo's InfraGeometry checkout goes further (removes FindInfraShell, InfraDensity and InfraSubgraph, renames the scene symbols) and its CHANGELOG folds in this PR's non-evaluation guards. Left open for that work to supersede or absorb. Note for whoever lands it: InfraCausality 2.1.0 calls InfraDensity in its kernel (the anchor rule) and documents InfraSubgraph as a set-head reader, so removing those breaks InfraCausality until it is ported.

p135246 added a commit that referenced this pull request Oct 23, 2026
- ResistanceQ: symmetry and zero diagonal within the tolerance 10^-9
- HomotopicQ, NullHomotopicQ: honour the Method option
- InfraFiberedGraphQ and the fibration predicates: a projection that
  is not a map (values are inert applications) gives False
- CenterGraph: negative and Scaled radii count from the eccentricity
  of the centre set, so -k drops k layers
- InfraSubstrate, InfraSubstrateCode: a scalar raw size n is the side
  n in every direction for the grids, tori and the diluted tree
- MiniballRadius: exact points give the exact radius
- Usage.wl: InfraFiberedSubstrate returns an InfraFiberedGraph; usage
  lines of CenterGraph, MiniballRadius, TessellationGenus, InfraSubstrate
- PacletInfo: version 2.9.0 for the worktree

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant