简体   繁体   English

SAS是否使用Java之类的数据结构

[英]Does SAS use data structures like Java

Java has the concept of data structures. Java具有数据结构的概念。 Each data structure has its own advantages and disadvantages. 每个数据结构都有其自身的优点和缺点。 In SAS, all data always goes into a 'data' step? 在SAS中,所有数据总是进入“数据”步骤吗?

What java Collection does the 'data' in SAS compare to? SAS中的“数据”与哪个Java集合进行比较? Is it an Array, a List? 它是一个数组,一个列表吗? Seems more like a Hashmap? 似乎更像是Hashmap?

Is it even fair to draw this comparison? 进行这种比较是否公平?

SAS data can be likened to a tables in any typical RDBMS. SAS数据可以比喻为任何典型RDBMS中的表。 So probably a two dimensional array would be the fairest comparison. 因此,二维数组可能是最公平的比较。 ie. 即。 a table structure. 表结构。

These structures can be operated on by all sorts of procedures (eg proc sort , proc sql , etc.) or the data step. 这些结构可以通过各种过程(例如proc sortproc sql等)或data步骤进行操作。

It's definitely not a hashmap as data in SAS does not require a unique key (as implemented by hashmaps). 它绝对不是哈希图,因为SAS中的数据不需要唯一键(由哈希图实现)。

If you wanted a different data structure such as a graph structure containing nodes, and edges, etc. then SAS does not really provide a mechanism to represent them. 如果要使用其他数据结构(例如包含节点和边的图结构),则SAS并没有真正提供表示它们的机制。

http://www.ats.ucla.edu/stat/sas/library/SASRead_os.htm says http://www.ats.ucla.edu/stat/sas/library/SASRead_os.htm

You can think of a data set as a two-dimensional table 您可以将数据集视为二维表

which IMO means that nothing directly comparable comes with standard Java. IMO的意思是标准Java不能直接与之媲美。 You can build similar (functionally equivalent) data structures with lists of lists or other collection of collection compositions. 您可以使用列表列表或其他集合构成集合来构建类似(功能上等效)的数据结构。

I don't think there's a direct comparison to a Java collection type, but articles I've seen loosely correlate it to an array. 我不认为可以与Java集合类型进行直接比较,但是我见过的文章将其与数组松散地关联。

https://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a003252712.htm https://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a003252712.htm

Only one-dimensional array parameters are supported. 仅支持一维数组参数。 However, it is possible to pass multidimensional array arguments by taking advantage of the fact that the arrays are passed in row-major order. 但是,可以利用数组以行优先顺序传递的事实来传递多维数组参数。 You must handle the dimensional indexing manually in the Java code--that is, you must declare a one-dimensional array parameter and index to the subarrays accordingly. 您必须在Java代码中手动处理维度索引-也就是说,您必须声明一维数组参数并相应地索引子数组。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM