TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
tmk::place::Raster Class Reference

Conservative occupancy raster per side (cell 0.05–0.1 mm). More...

#include <place/legality.hpp>

Public Member Functions

 Raster (const Problem &p, Coord cell)
void add (int part, Point pos, int rot, int delta)
 delta = +1 insert, -1 remove
bool free (int part, Point pos, int rot) const
 summed-area tables: O(shapes) per call
bool free_reference (int part, Point pos, int rot) const
 cell scan (reference path for tests)
Coord cell () const
double inside_fraction (int side) const
 Fraction of cells inside the board on side s (for diagnostics).

Detailed Description

Conservative occupancy raster per side (cell 0.05–0.1 mm).

free() returning true proves that the part is legal against the board and every part in the raster; false means "maybe illegal" (run the exact test).

Definition at line 78 of file legality.hpp.

Constructor & Destructor Documentation

◆ Raster()

tmk::place::Raster::Raster ( const Problem & p,
Coord cell )

Member Function Documentation

◆ add()

void tmk::place::Raster::add ( int part,
Point pos,
int rot,
int delta )

delta = +1 insert, -1 remove

◆ cell()

Coord tmk::place::Raster::cell ( ) const
inline

Definition at line 84 of file legality.hpp.

◆ free()

bool tmk::place::Raster::free ( int part,
Point pos,
int rot ) const

summed-area tables: O(shapes) per call

◆ free_reference()

bool tmk::place::Raster::free_reference ( int part,
Point pos,
int rot ) const

cell scan (reference path for tests)

◆ inside_fraction()

double tmk::place::Raster::inside_fraction ( int side) const

Fraction of cells inside the board on side s (for diagnostics).


The documentation for this class was generated from the following file: