Java 中最快的数据结构(4D 可视化处理)
我有一个需要使用可视化框架的应用程序。我目前倾向于在 Java 桌面应用程序中使用处理。
问题:我需要可视化大约 500k+ 个状态向量。 4D 点 - XYZ 和时间(类似 GPS)
我需要能够快速轻松地选择时间片,并且能够及时播放它们。我能够使用平面文件或数据库更改输入。
所以问题是:哪种数据结构最能满足我的需求?我是否将文件读入数组列表?哈希图?或者内存数据库?还是别的什么?
性能是 3D 可视化的必要条件。时间长达8小时以上。因此,并非所有内容都会同时显示。
有没有人尝试过使用创意编码框架来进行此类用途?有什么建议吗?
谢谢!
I've got an application that i need to use a visualization framework for. I'm currently leaning towards Processing for use in a Java desktop app.
Problem: I've got ~500k+ state vectors i need to visualize. 4D points - XYZ and time (GPS-like)
I need to be able to select time slices fast and easily, also having the capability to play them in time. I have the ability to change the input, using either flat files or a db.
So the question is: what data structure will best accommodate my needs? Do i read the files into an Arraylists? Hashmap? Or an in memory database? Or something else?
Performance is a must for visualizing in 3D. The time period is over 8 hours. So not all of them will be displayed at once.
Has anyone attempted to use a creative coding framework for this type of use? Any suggestions?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
使用 OpenGL 进行处理是一种选择,但如果您遇到性能问题,我建议您查看 openframeworks 或 < a href="http://libcinder.org/" rel="nofollow noreferrer">libcinder。
它们是c++,不是java,而是例如openframeworks
具有与处理非常相似的语法。
将 Matt Swoboda 的 recode 条目与其他处理实现进行比较。
这个想法是,尝试使用 OpenGL 进行处理,看看是否获得所需的帧速率,否则尝试 openframewoks 或 libcinder。
华泰
Processing with OpenGL is an option, but if you run into performance issues, I would recommend having a look at openframeworks or libcinder.
They are c++, not java, but openframeworks for example
has a very similar syntax to Processing.
Compare Matt Swoboda's recode entry to the other processing implementations.
The idea is, try Processing with OpenGL to see if you get the framerate you need, otherwise try openframewoks or libcinder.
HTH
jMonkey 提供了一个场景图,它可以完成您所描述的操作。
它维护随时间变化的 3D 空间表示。我认为通常它使用系统时钟来测量时间,这意味着您不会直接操作它,但我打赌您可以插入一个组件来允许您自己指定时间......(即检查您指定的时间图表的状态)。
jMonkey provides a scene graph that does something like what you describe.
It maintains a representation of 3D space that changes with time. I think normally it measures time with the system clock, meaning you don't manipulate it directly, but I bet you could plug in a component that would allow you to specify time yourself... (i.e. check the state of the graph at a time you specify).
二维数组听起来是个好主意。使用快速排序或合并排序等良好的排序算法,您将能够选择时间片。
the 2d array sounds like a good idea. With a nice sorting algorithm like quicksort or mergesort, you'll be able to select time slices.
只要确保从头到尾对它们进行排序即可。保持简单并进行测试?
Just make sure you sort them from start to end. Keep it simple and test it?