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
37// <summary>
38// Class representing a cone search in table select expression
39// </summary>
40
41// <use visibility=local>
42
43// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
44// </reviewed>
45// <prerequisite>
46//# Classes you should understand before using this one.
47// <li> <linkto class=TableExprFuncNode>TableExprFuncNode</linkto>
48// </prerequisite>
49
50// <synopsis>
51// The class represents a cone search.
52// It is a specialization of the TableExprFuncNode class.
53// Currently the implementation is straightforward, but in the future
54// it can do smarter things.
55// For instance:
56// <ul>
57// <li> If the cone positions and radii are constant, one can use
58// an integer zone number (e.g. floor(dec)) to avoid the much
59// more expensive sine/cosine calculations. Each cone will get a
60// minzone and maxzone value (derived from cone position and radius).
61// <li> Multiple cones can be ordered on minzone and maxzone.
62// </ul>
63// </synopsis>
64
65
67{
68public:
69 // Constructor
71 const TableExprNodeSet& source,
72 const vector<TENShPtr>& nodes,
73 const Block<Int>& dtypeOper,
74 uInt origin);
75
76 // Destructor
78
79 // 'get' Functions to get the desired result of a function.
80 // <group>
83 // </group>
84
85 // Check the data and value types of the operands.
86 // It sets the exptected data and value types of the operands.
87 // Set the value type of the function result and returns
88 // the data type of the function result.
90 ValueType& resVT,
91 Block<Int>& vtypeOper,
93 const std::vector<TENShPtr>&);
94
95private:
96 // Find the number of elements in an argument.
97 // It returns -1 if unknown.
98 static Int findNelem (const TENShPtr& node);
99
100
102};
103
104
105
106
108{
109public:
110 // Constructor
112 const TableExprNodeSet& source,
113 const vector<TENShPtr>& nodes,
114 const Block<Int>& dtypeOper,
115 uInt origin);
116
117 // Destructor
119
120 // 'get' Functions to get the desired result of a function.
121 // <group>
124 // </group>
125
126private:
128};
129
130
131} //# NAMESPACE CASACORE - END
132
133#endif
simple 1-D array
Definition Block.h:198
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.
NodeDataType
Define the data types of a node.
ValueType
Define the value types.
this file contains all the compiler specific defines
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:55
int Int
Definition aipstype.h:48
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40