Mantid
Loading...
Searching...
No Matches
Algebra.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9#include "MantidGeometry/DllConfig.h"
12#include "MantidKernel/Matrix.h"
13
14namespace Mantid {
15
16namespace Geometry {
17
30class MANTID_GEOMETRY_DLL Algebra {
31private:
32 std::map<int, std::string> SurfMap;
34
35public:
36 Algebra();
37
39 const Acomp &getComp() const { return F; }
40
41 bool operator==(const Algebra &) const;
42 bool operator!=(const Algebra &) const;
43 Algebra &operator+=(const Algebra &);
44 Algebra &operator*=(const Algebra &);
45 Algebra operator+(const Algebra &) const;
46 Algebra operator*(const Algebra &) const;
47 int logicalEqual(const Algebra &) const;
48
49 void Complement();
50 void makeDNF() { F.makeDNFobject(); }
51 void makeCNF() { F.makeCNFobject(); }
52 std::pair<Algebra, Algebra> algDiv(const Algebra &) const;
53 int setFunctionObjStr(const std::string &);
54 int setFunction(const std::string &);
55 int setFunction(const Acomp &);
56
57 std::ostream &write(std::ostream &) const;
58 std::string writeMCNPX() const;
59
60 // Debug Functions::
61 int countLiterals() const;
63 std::string display() const;
64};
65
66std::ostream &operator<<(std::ostream &, const Algebra &);
67
68} // NAMESPACE Geometry
69
70} // NAMESPACE Mantid
Holds a state point in the decision tree.
Definition: Acomp.h:43
int makeDNFobject()
Make the object into DNF form (Sum of Products)
Definition: Acomp.cpp:1054
int makeCNFobject()
Make the object into CNF form (Product of Sums)
Definition: Acomp.cpp:1071
Computes Boolean algebra for simplification.
Definition: Algebra.h:30
void makeCNF()
assessor to makeCNFobj
Definition: Algebra.h:51
const Acomp & getComp() const
Accessor.
Definition: Algebra.h:39
void makeDNF()
assessor to makeDNFobj
Definition: Algebra.h:50
std::map< int, std::string > SurfMap
Internal surface map.
Definition: Algebra.h:32
MatrixWorkspace_sptr MANTID_API_DLL operator*(const MatrixWorkspace_sptr &lhs, const MatrixWorkspace_sptr &rhs)
Multiply two workspaces.
MatrixWorkspace_sptr MANTID_API_DLL operator+=(const MatrixWorkspace_sptr &lhs, const MatrixWorkspace_sptr &rhs)
Adds two workspaces.
MatrixWorkspace_sptr MANTID_API_DLL operator*=(const MatrixWorkspace_sptr &lhs, const MatrixWorkspace_sptr &rhs)
Multiply two workspaces.
MatrixWorkspace_sptr MANTID_API_DLL operator+(const MatrixWorkspace_sptr &lhs, const MatrixWorkspace_sptr &rhs)
Adds two workspaces.
MANTID_GEOMETRY_DLL std::ostream & operator<<(std::ostream &stream, const PointGroup &self)
Returns a streamed representation of the PointGroup object.
Definition: PointGroup.cpp:312
Helper class which provides the Collimation Length for SANS instruments.
constexpr bool operator==(const wide_integer< Bits, Signed > &lhs, const wide_integer< Bits2, Signed2 > &rhs)
constexpr bool operator!=(const wide_integer< Bits, Signed > &lhs, const wide_integer< Bits2, Signed2 > &rhs)