Re: native arrays in class diagrams



Daniel T. wrote:

You came up with one way, I came up with one, and Philp came up with yet
another. No troll here.

I don't know how to say this in more ways than I already did, so I'll
just say it a few more times. My problem is that I need to show a
qualified composite binary association with an array as values. It is
*very* important that I show exactly that and nothing else.

To rationalize the model and by remove semantics would cripple the
overview as it is suppsed to point out an access optimization.

This the diagram:
https://issues.apache.org/jira/secure/attachment/12325693/12325693_class_diagram.png

It is an old revsion and it contains plenty of flaws. I know my inner
classes should be []o---- and not []- - ->. And I know there are a few
misses in the model compared to Lucene (e.g. the float[] points at a
Document and not a field), so try not to focus on anything but the
following association:

[InstanciatedIndex](field)<#>---- +boost {0..1} ->[float[]]

I don't like the float[] class. It does the job, but I don't like it.
It's ugly.

Compare to

[IIDocument](field)<#>---- {0..1} ->[IITermFreqVector]

where IITFV contains two native arrays. This is OK with me as the
arrays are encapsulated by the class. In the association to the float[]
that array is the most outer class.

Rationalizing the matrix of values to a set of values in the model will
not do it for me. I need to show very clearly that it is a qualified
composite binary association with a native array as values.

Is there any praxis on how to display the array (as the subject of this
thread indicate) in such an association?

.



Relevant Pages

  • Re: weird code.
    ... never seen this kind of declaration ever. ... The variable data is a float pointer? ... array of 16384 float objects. ...
    (comp.lang.c)
  • Re: Help a beginner - function with pointer ...
    ... i thought (float *) T would be appealing to ... The result is the value obtained by converting the ... `T' refers to a one-dimensional array whose elements are also ... using a pointer to the array's first element. ...
    (comp.lang.c)
  • Re: weird code.
    ... The variable data is a float pointer? ... array of 16384 float objects. ... We just write `sizeof *data' and the compiler (knowing what ...
    (comp.lang.c)
  • Re: Vector efficiency
    ... <float>.get(i) to retrieve each record versus aligning the data into an array declared as float, and noticed about 2x computational speed improvement. ... I guess there are a number of step performing a look up with vector has to do as opposed to simple addressing through an array. ... There's also the memory issue (c.f. another ... Expenditure of computer time is not the only ...
    (comp.lang.java.help)
  • Re: new foo[42]
    ... > First question: ... 42 type 'float' objects, and returns the address ... value in the pointer object 'foo'. ... The first form above dynamically allocates an array (which ...
    (comp.lang.cpp)