File: PlacingTriang.hh

package info (click to toggle)
topcom 1.1.2%2Bds-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 31,788 kB
  • sloc: cpp: 37,616; sh: 4,262; makefile: 497; ansic: 49
file content (70 lines) | stat: -rw-r--r-- 1,884 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//////////////////////////////////////////////////////////////////////////
// PlacingTriang.hh
// produced: 06/07/98 jr
// last change: 06/07/98 jr
/////////////////////////////////////////////////////////////////////////
#ifndef PLACINGTRIANG_HH
#define PLACINGTRIANG_HH

#include <assert.h>

#include "HashSet.hh"
#include "LabelSet.hh"
#include "SimplicialComplex.hh"

#include "CommandlineOptions.hh"

#include "Permutation.hh"
#include "Chirotope.hh"

namespace topcom {

  class PlacingTriang : public SimplicialComplex {
  private:
    const Chirotope*  _chiroptr;
    SimplicialComplex _bd_triang;
  public:
    inline PlacingTriang();
    inline PlacingTriang(const PlacingTriang& pt);
    inline PlacingTriang(const Chirotope& chiro);
    inline ~PlacingTriang();
    inline PlacingTriang& operator=(const PlacingTriang& pt);
    inline SimplicialComplex boundary_triang() const;
  private:
    void _place();
    void _place(LabelSet& placed, 
		const size_type i);
    const bool _is_visible_from(const LabelSet placed, 
				const Simplex& facet, 
				const size_type i) const;
  };

  inline PlacingTriang::PlacingTriang() :
    SimplicialComplex(), _chiroptr(0), _bd_triang() {}

  inline PlacingTriang::PlacingTriang(const PlacingTriang& pt) : 
    SimplicialComplex(pt), _chiroptr(pt._chiroptr), _bd_triang(pt._bd_triang) {}

  inline PlacingTriang::PlacingTriang(const Chirotope& chiro) : 
    SimplicialComplex(), _chiroptr(&chiro), _bd_triang() {
    _place();
  }

  inline PlacingTriang::~PlacingTriang() {}

  inline PlacingTriang& PlacingTriang::operator=(const PlacingTriang& pt) {
    if (this == &pt) return *this;
    SimplicialComplex::operator=(pt);
    _chiroptr = pt._chiroptr;
    return *this;
  }

  inline SimplicialComplex PlacingTriang::boundary_triang() const {
    return _bd_triang;
  }

}; // namespace topcom

#endif

// eof PlacingTriang.hh