2024-09-10 15:45:07 +08:00
|
|
|
|
/********************************************************
|
|
|
|
|
* ██████╗ ██████╗████████╗██╗
|
|
|
|
|
* ██╔════╝ ██╔════╝╚══██╔══╝██║
|
|
|
|
|
* ██║ ███╗██║ ██║ ██║
|
|
|
|
|
* ██║ ██║██║ ██║ ██║
|
|
|
|
|
* ╚██████╔╝╚██████╗ ██║ ███████╗
|
|
|
|
|
* ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝
|
|
|
|
|
* Geophysical Computational Tools & Library (GCTL)
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 2023 Yi Zhang (yizhang-geo@zju.edu.cn)
|
|
|
|
|
*
|
|
|
|
|
* GCTL is distributed under a dual licensing scheme. You can redistribute
|
|
|
|
|
* it and/or modify it under the terms of the GNU Lesser General Public
|
|
|
|
|
* License as published by the Free Software Foundation, either version 2
|
|
|
|
|
* of the License, or (at your option) any later version. You should have
|
|
|
|
|
* received a copy of the GNU Lesser General Public License along with this
|
|
|
|
|
* program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*
|
|
|
|
|
* If the terms and conditions of the LGPL v.2. would prevent you from using
|
|
|
|
|
* the GCTL, please consider the option to obtain a commercial license for a
|
|
|
|
|
* fee. These licenses are offered by the GCTL's original author. As a rule,
|
|
|
|
|
* licenses are provided "as-is", unlimited in time for a one time fee. Please
|
|
|
|
|
* send corresponding requests to: yizhang-geo@zju.edu.cn. Please do not forget
|
|
|
|
|
* to include some description of your company and the realm of its activities.
|
|
|
|
|
* Also add information on how to contact you by electronic and paper mail.
|
|
|
|
|
******************************************************/
|
|
|
|
|
|
|
|
|
|
#ifndef _GCTL_ENUM_H
|
|
|
|
|
#define _GCTL_ENUM_H
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* This file contains enumerate types that are used across different source files.
|
|
|
|
|
* Enumerates that are used only in a signal source file are defined within the
|
|
|
|
|
* specific file.
|
|
|
|
|
*
|
|
|
|
|
* 此文件仅包含在多个源文件中都使用到的枚举类型,单独类型中使用到枚举类型直接定义在相应的头文件中。
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
namespace gctl
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* @brief 测度类型
|
|
|
|
|
*/
|
|
|
|
|
enum norm_type_e
|
|
|
|
|
{
|
|
|
|
|
L0,
|
|
|
|
|
L1,
|
|
|
|
|
L2,
|
2024-10-07 09:04:10 +08:00
|
|
|
|
Lp,
|
2024-09-10 15:45:07 +08:00
|
|
|
|
Linf,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 随机类型
|
|
|
|
|
*/
|
|
|
|
|
enum random_type_e
|
|
|
|
|
{
|
|
|
|
|
RdNormal, ///< 正态分布
|
|
|
|
|
RdUniform, ///< 均匀分布
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 二维矩阵使用的排序方式
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
enum matrix_layout_e
|
|
|
|
|
{
|
|
|
|
|
NoTrans, ///< 不转置
|
|
|
|
|
Trans, ///< 转置
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 使能类型
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
enum switch_type_e
|
|
|
|
|
{
|
|
|
|
|
Enable,
|
|
|
|
|
Disable,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum conjugate_type_e
|
|
|
|
|
{
|
|
|
|
|
Conj, ///< 共轭
|
|
|
|
|
NoConj, ///< 非共轭
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 二维矩阵储存的排序方式
|
|
|
|
|
*/
|
|
|
|
|
enum matrix_order_e
|
|
|
|
|
{
|
|
|
|
|
RowMajor, ///< 行优先,即优先储存每行的数据
|
|
|
|
|
ColMajor, ///< 列优先,即优先储存每列的数据
|
|
|
|
|
};
|
|
|
|
|
|
2024-12-27 12:28:17 +08:00
|
|
|
|
/**
|
|
|
|
|
* @brief 二维矩阵储存的起点位置
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
enum matrix_corner_e
|
|
|
|
|
{
|
|
|
|
|
TopLeft, ///< 起点为左上,与数学表述中矩阵的排序方式一致
|
|
|
|
|
BtmLeft, ///< 起点为左下,与二维坐标系统中从小到大的排序方式一致
|
|
|
|
|
};
|
|
|
|
|
|
2024-09-10 15:45:07 +08:00
|
|
|
|
/**
|
|
|
|
|
* @brief 数组中的数值操作类型。
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
enum value_operator_e
|
|
|
|
|
{
|
|
|
|
|
AppendVal, ///< 追加 相加
|
|
|
|
|
RemoveVal, ///< 删除 相减
|
|
|
|
|
ReplaceVal, ///< 替换
|
|
|
|
|
EraseVal, ///< 删除 归零
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 网格中的数据属性类型。
|
|
|
|
|
*/
|
|
|
|
|
enum mesh_data_type_e
|
|
|
|
|
{
|
|
|
|
|
NodeData, ///< 属于顶点的数据
|
|
|
|
|
ElemData, ///< 属于模型元素的数据,包括二维及三维元素
|
|
|
|
|
ElemData2D, ///< 属于二维模型元素的数据
|
|
|
|
|
ElemData3D, ///< 属于三维模型元素的数据
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 输出文件的写入类型
|
|
|
|
|
*/
|
|
|
|
|
enum output_type_e
|
|
|
|
|
{
|
|
|
|
|
Append, ///< 追加
|
|
|
|
|
OverWrite, ///< 覆盖
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 函数返回信息的类型
|
|
|
|
|
*/
|
|
|
|
|
enum verbose_type_e
|
|
|
|
|
{
|
|
|
|
|
NoMsg, ///< 无信息
|
|
|
|
|
ShortMsg, ///< 简短信息
|
|
|
|
|
FullMsg, ///< 全信息
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 方向梯度的枚举类型
|
|
|
|
|
*/
|
|
|
|
|
enum gradient_type_e
|
|
|
|
|
{
|
|
|
|
|
Value, ///< 表示非梯度
|
|
|
|
|
Dx, ///< x方向梯度
|
|
|
|
|
Dy, ///< y方向梯度
|
|
|
|
|
Dz, ///< z方向梯度
|
|
|
|
|
Dphi, ///< 经度方向梯度
|
|
|
|
|
Dtheta, ///< 纬度方向梯度
|
|
|
|
|
Dr, ///< 半径方向梯度
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 文件流操作的方向
|
|
|
|
|
*/
|
|
|
|
|
enum file_direction_e
|
|
|
|
|
{
|
|
|
|
|
Input, ///< 输入文件
|
|
|
|
|
Output ///< 输出文件
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 用于表示带有索引序号的对象数组中索引是否为从零开始。
|
|
|
|
|
* 如顶点集序号的索引,或者四面体集序号的索引。
|
|
|
|
|
*/
|
|
|
|
|
enum index_packed_e
|
|
|
|
|
{
|
|
|
|
|
Packed, ///< 索引从0开始
|
|
|
|
|
NotPacked, ///< 索引从1开始
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 二维或者三维实体的类型
|
|
|
|
|
*/
|
|
|
|
|
enum physical_type_e
|
|
|
|
|
{
|
|
|
|
|
Block,
|
|
|
|
|
TiltBlock,
|
|
|
|
|
Sphere,
|
|
|
|
|
Ellipsoid,
|
|
|
|
|
Surface,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 边的顶点排序类型
|
|
|
|
|
*/
|
|
|
|
|
enum edge_orient_e
|
|
|
|
|
{
|
|
|
|
|
Normal, // index of the edge's nodes are ordered from small to big
|
|
|
|
|
Reverse, // index of the edge's nodes are ordered from big to small
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 滤波类型
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
enum filting_type_e
|
|
|
|
|
{
|
|
|
|
|
LowPass,
|
|
|
|
|
HighPass,
|
|
|
|
|
BandPass,
|
|
|
|
|
BandStop,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 滤波器类型
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
enum filter_type_e
|
|
|
|
|
{
|
|
|
|
|
Gaussian,
|
|
|
|
|
Butterworth,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 窗函数类型
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
enum window_type_e
|
|
|
|
|
{
|
|
|
|
|
None,
|
|
|
|
|
Hamming,
|
|
|
|
|
Hanning,
|
|
|
|
|
Triangle,
|
|
|
|
|
Blackman,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 坐标系统类型
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
enum coordinate_system_e
|
|
|
|
|
{
|
|
|
|
|
Cartesian,
|
|
|
|
|
Spherical,
|
|
|
|
|
Ellipsoidal,
|
|
|
|
|
Polar,
|
|
|
|
|
};
|
2024-09-13 10:08:41 +08:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief 范围约束类型
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
enum range_type_e
|
|
|
|
|
{
|
|
|
|
|
HardScale, // 所有数据按比例映射至min和max范围内
|
|
|
|
|
SoftScale, // 所有数据按比例映射至max(min, min(arr))和min(max, max(arr))范围内
|
|
|
|
|
CutOff, // 超过min和max范围数据直接设置为边界值
|
|
|
|
|
};
|
2024-09-10 15:45:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif // _GCTL_ENUM_H
|