casacore
Loading...
Searching...
No Matches
ExprConeNode.h
Go to the documentation of this file.
1// # ExprConeNode.h: Class representing a cone search in table select expression
2// # Copyright (C) 2005
3// # Associated Universities, Inc. Washington DC, USA.
4// #
5// # This library is free software; you can redistribute it and/or modify it
6// # under the terms of the GNU Library General Public License as published by
7// # the Free Software Foundation; either version 2 of the License, or (at your
8// # option) any later version.
9// #
10// # This library is distributed in the hope that it will be useful, but WITHOUT
11// # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12// # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13// # License for more details.
14// #
15// # You should have received a copy of the GNU Library General Public License
16// # along with this library; if not, write to the Free Software Foundation,
17// # Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18// #
19// # Correspondence concerning AIPS++ should be addressed as follows:
20// # Internet email: casa-feedback@nrao.edu.
21// # Postal address: AIPS++ Project Office
22// # National Radio Astronomy Observatory
23// # 520 Edgemont Road
24// # Charlottesville, VA 22903-2475 USA
25
26#ifndef TABLES_EXPRCONENODE_H
27#define TABLES_EXPRCONENODE_H
28
29// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/tables/TaQL/ExprFuncNode.h>
32#include <casacore/tables/TaQL/ExprFuncNodeArray.h>
33
34namespace casacore { // # NAMESPACE CASACORE - BEGIN
35
36// <summary>
37// Class representing a cone search in table select expression
38// </summary>
39
40// <use visibility=local>
41
42// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
43// </reviewed>
44// <prerequisite>
45// # Classes you should understand before using this one.
46// <li> <linkto class=TableExprFuncNode>TableExprFuncNode</linkto>
47// </prerequisite>
48
49// <synopsis>
50// The class represents a cone search.
51// It is a specialization of the TableExprFuncNode class.
52// Currently the implementation is straightforward, but in the future
53// it can do smarter things.
54// For instance:
55// <ul>
56// <li> If the cone positions and radii are constant, one can use
57// an integer zone number (e.g. floor(dec)) to avoid the much
58// more expensive sine/cosine calculations. Each cone will get a
59// minzone and maxzone value (derived from cone position and radius).
60// <li> Multiple cones can be ordered on minzone and maxzone.
61// </ul>
62// </synopsis>
63
65 public:
66 // Constructor
68 const vector<TENShPtr>& nodes, const Block<Int>& dtypeOper, uInt origin);
69
70 // Destructor
72
73 // 'get' Functions to get the desired result of a function.
74 // <group>
77 // </group>
78
79 // Check the data and value types of the operands.
80 // It sets the exptected data and value types of the operands.
81 // Set the value type of the function result and returns
82 // the data type of the function result.
83 static NodeDataType checkOperands(Block<Int>& dtypeOper, ValueType& resVT, Block<Int>& vtypeOper,
84 FunctionType, const std::vector<TENShPtr>&);
85
86 private:
87 // Find the number of elements in an argument.
88 // It returns -1 if unknown.
89 static Int findNelem(const TENShPtr& node);
90
92};
93
95 public:
96 // Constructor
98 const TableExprNodeSet& source, const vector<TENShPtr>& nodes,
99 const Block<Int>& dtypeOper, uInt origin);
100
101 // Destructor
103
104 // 'get' Functions to get the desired result of a function.
105 // <group>
108 // </group>
109
110 private:
112};
113
114} // namespace casacore
115
116#endif
MArray< Int64 > getArrayInt(const TableExprId &id)
TableExprConeNodeArray(TableExprFuncNode::FunctionType, NodeDataType, const TableExprNodeSet &source, const vector< TENShPtr > &nodes, const Block< Int > &dtypeOper, uInt origin)
Constructor.
MArray< Bool > getArrayBool(const TableExprId &id)
'get' Functions to get the desired result of a function.
TableExprConeNode(FunctionType, NodeDataType, const TableExprNodeSet &source, const vector< TENShPtr > &nodes, const Block< Int > &dtypeOper, uInt origin)
Constructor.
static NodeDataType checkOperands(Block< Int > &dtypeOper, ValueType &resVT, Block< Int > &vtypeOper, FunctionType, const std::vector< TENShPtr > &)
Check the data and value types of the operands.
static Int findNelem(const TENShPtr &node)
Find the number of elements in an argument.
Int64 getInt(const TableExprId &id)
Bool getBool(const TableExprId &id)
'get' Functions to get the desired result of a function.
TableExprFuncNodeArray(TableExprFuncNode::FunctionType, NodeDataType, ValueType, const TableExprNodeSet &source, const vector< TENShPtr > &nodes, const Block< Int > &dtypeOper, const TaQLStyle &)
Constructor.
TableExprFuncNode(FunctionType, NodeDataType, ValueType, const TableExprNodeSet &source, const vector< TENShPtr > &nodes, const Block< Int > &dtypeOper, const TableExprInfo &=TableExprInfo())
Constructor.
NodeDataType
Define the data types of a node.
ValueType
Define the value types.
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
unsigned int uInt
Definition aipstype.h:49
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size).
Definition aipsxtype.h:36
std::shared_ptr< TableExprNodeRep > TENShPtr
Definition ExprNodeRep.h:56
int Int
Definition aipstype.h:48
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40