partition.h 973 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * @file
  3. * @brief function @ref partition, subroutine of @ref mkMaze
  4. */
  5. /*************************************************************************
  6. * Copyright (c) 2011 AT&T Intellectual Property
  7. * All rights reserved. This program and the accompanying materials
  8. * are made available under the terms of the Eclipse Public License v1.0
  9. * which accompanies this distribution, and is available at
  10. * https://www.eclipse.org/legal/epl-v10.html
  11. *
  12. * Contributors: Details at https://graphviz.org
  13. *************************************************************************/
  14. #pragma once
  15. #include <ortho/maze.h>
  16. #include <stddef.h>
  17. /**
  18. * @brief partitions space around cells (nodes) into rectangular tiles
  19. * @param[in] cells rectangular borders of user's input graph's nodes
  20. * @param[in] bb range of the space to partition
  21. * @param[out] nrects number of tiles
  22. * @returns array of the tiles
  23. */
  24. boxf *partition(cell *cells, int ncells, size_t *nrects, boxf bb);