
Hilbert空间递归演示_数据分析师
Hilbert空间填充曲线在图像采样等方面十分有用关于什么希尔伯特
空间填充曲线看这里:http://en.wikipedia.org/wiki/Hilbert_curve
程序效果:
模拟Hilbert空间填充曲线效果,点击鼠标自动叠加!运行效果截图
Hilbert源程序代码:
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
package com.gloomyfish.image.hilbert;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;
public class Hilbert {
public static final int WHEELSIZE = 1024;
// four edges
public static final int NORTH = 0;
public static final int EAST = 90;
public static final int SOUTH = 180;
public static final int WEST = 270;
// four corners
public static final int NE = 45;
public static final int SE = 135;
public static final int SW = 225;
public static final int NW = 315;
// attributes
private Point location;
private Color[] colorWheel;
private int colorIdx;
public Hilbert() {
// build color lookup table
this.colorWheel = new Color[1024];
for (int i = 0; i < 128; ++i)
this.colorWheel[i] = new Color(0, 255 - i, i);
for (int j = 128; j < 256; ++j)
this.colorWheel[j] = new Color(0, j, j);
for (int k = 0; k < 256; ++k)
this.colorWheel[(k + 256)] = new Color(0, 255 - k, 255);
for (int l = 0; l < 128; ++l)
this.colorWheel[(l + 512)] = new Color(0, l, 255 - l);
for (int i1 = 0; i1 < 128; ++i1)
this.colorWheel[(i1 + 640)] = new Color(0, 127 - i1, 127 - i1);
for (int i2 = 0; i2 < 256; ++i2)
this.colorWheel[(i2 + 768)] = new Color(0, i2, 0);
this.colorIdx = 0;
}
public void process(Graphics graphic, int level, int width, int height) {
this.location = null;
if(level > 32 )
{
graphic.drawString("could get max depth is 32!", 40, 40);
return;
}
hilbert(graphic, level, 0, 0, width, height, 0, 225);
}
public void hilbert(Graphics g, int depth, int startx, int starty, int width, int height, int startgray, int endgray) {
int centerX = width / 2;
int centerY = height / 2;
if (depth == 0) {
if (this.location != null) {
g.setColor(this.colorWheel[this.colorIdx]);
g.drawLine(this.location.x, this.location.y,
startx + centerX, starty + centerY);
if (++this.colorIdx >= 1024)
this.colorIdx = 0;
}
this.location = new Point(startx + centerX, starty + centerY);
return;
}
switch (startgray) {
|
数据分析咨询请扫描二维码
若不方便扫码,搜微信号:CDAshujufenxi
LSTM 模型输入长度选择技巧:提升序列建模效能的关键 在循环神经网络(RNN)家族中,长短期记忆网络(LSTM)凭借其解决长序列 ...
2025-07-11CDA 数据分析师报考条件详解与准备指南 在数据驱动决策的时代浪潮下,CDA 数据分析师认证愈发受到瞩目,成为众多有志投身数 ...
2025-07-11数据透视表中两列相乘合计的实用指南 在数据分析的日常工作中,数据透视表凭借其强大的数据汇总和分析功能,成为了 Excel 用户 ...
2025-07-11尊敬的考生: 您好! 我们诚挚通知您,CDA Level I和 Level II考试大纲将于 2025年7月25日 实施重大更新。 此次更新旨在确保认 ...
2025-07-10BI 大数据分析师:连接数据与业务的价值转化者 在大数据与商业智能(Business Intelligence,简称 BI)深度融合的时代,BI ...
2025-07-10SQL 在预测分析中的应用:从数据查询到趋势预判 在数据驱动决策的时代,预测分析作为挖掘数据潜在价值的核心手段,正被广泛 ...
2025-07-10数据查询结束后:分析师的收尾工作与价值深化 在数据分析的全流程中,“query end”(查询结束)并非工作的终点,而是将数 ...
2025-07-10CDA 数据分析师考试:从报考到取证的全攻略 在数字经济蓬勃发展的今天,数据分析师已成为各行业争抢的核心人才,而 CDA(Certi ...
2025-07-09【CDA干货】单样本趋势性检验:捕捉数据背后的时间轨迹 在数据分析的版图中,单样本趋势性检验如同一位耐心的侦探,专注于从单 ...
2025-07-09year_month数据类型:时间维度的精准切片 在数据的世界里,时间是最不可或缺的维度之一,而year_month数据类型就像一把精准 ...
2025-07-09CDA 备考干货:Python 在数据分析中的核心应用与实战技巧 在 CDA 数据分析师认证考试中,Python 作为数据处理与分析的核心 ...
2025-07-08SPSS 中的 Mann-Kendall 检验:数据趋势与突变分析的有力工具 在数据分析的广袤领域中,准确捕捉数据的趋势变化以及识别 ...
2025-07-08备战 CDA 数据分析师考试:需要多久?如何规划? CDA(Certified Data Analyst)数据分析师认证作为国内权威的数据分析能力认证 ...
2025-07-08LSTM 输出不确定的成因、影响与应对策略 长短期记忆网络(LSTM)作为循环神经网络(RNN)的一种变体,凭借独特的门控机制,在 ...
2025-07-07统计学方法在市场调研数据中的深度应用 市场调研是企业洞察市场动态、了解消费者需求的重要途径,而统计学方法则是市场调研数 ...
2025-07-07CDA数据分析师证书考试全攻略 在数字化浪潮席卷全球的当下,数据已成为企业决策、行业发展的核心驱动力,数据分析师也因此成为 ...
2025-07-07剖析 CDA 数据分析师考试题型:解锁高效备考与答题策略 CDA(Certified Data Analyst)数据分析师考试作为衡量数据专业能力的 ...
2025-07-04SQL Server 字符串截取转日期:解锁数据处理的关键技能 在数据处理与分析工作中,数据格式的规范性是保证后续分析准确性的基础 ...
2025-07-04CDA 数据分析师视角:从数据迷雾中探寻商业真相 在数字化浪潮席卷全球的今天,数据已成为企业决策的核心驱动力,CDA(Certifie ...
2025-07-04CDA 数据分析师:开启数据职业发展新征程 在数据成为核心生产要素的今天,数据分析师的职业价值愈发凸显。CDA(Certified D ...
2025-07-03