Program: MKLSGRIDFXSLAYERTRI

  mklsgridfxslayertri......construct Fast Access (FXS-) Layer
 
  call: fxslayer=mklsgridfxslayertri(layer);
 
               layer: (struct)
                      layer structure as returned by MKLSGRIDNEWTRILAYER
 
  result: fxslayer: (struct)
                      a fast access layer structure.
                      as LAYER, but all node IDs are now replaced by the
                      array index in the node list for faster access.
                      ADDITIONAL FIELDS in FXS layer:
                      .maxfit: the maximum value of al .fit values.
                      .triids: list of triangle IDs, for fast search for
                               triangles by ID
 
  Searching the neighbours of a given triangle requires a lot of calls to
  MKLSGRIDGETTRIANGLE, making this a very slow process.
  This routine produces a layer structure in which the index to the node
  list is used as ID in triangles and fitness lists, and where triangle IDs
  are given in a separate list which may be searched fast.
  It is not very elegant to use two versions of the layer structure, but
  the need for speed makes it necessary. :-(
 
  Triangle IDs are not changed, which is important since Triangle IDs are
  what the neighbour-tests are searching for.
 
  Martin Knapmeyer, 23.11.2004, 08.12.2004

Read M-File Source Code


eof.