group

Groups data by colour label etc.

Will also add DefaultValues for label etc to the data. It is also possible to specify exactly what to group by on as a template parameter. See example.

template group(Specs...)
group
(
AES
)
(
AES aes
)

Members

Functions

buildExtractKey
string buildExtractKey()
Undocumented in source. Be warned that the author may not have intended to support it.
group
auto group(AES aes)
Undocumented in source. Be warned that the author may not have intended to support it.

Examples

import std.range : walkLength;
auto aes = Aes!(double[], "x", string[], "colour", double[], "alpha")
    ([0,1,2,3], ["a","a","b","b"], [0,1,0,1]);

assertEqual(group!("colour","alpha")(aes).walkLength,4);
assertEqual(group!("alpha")(aes).walkLength,2);

assertEqual(group(aes).walkLength,4);
auto aes = Aes!(double[], "x", double[], "y", string[], "colour")([1.0,
    2.0, 1.1], [3.0, 1.5, 1.1], ["a", "b", "a"]);

import std.range : walkLength, front, popFront;

auto grouped = aes.group;
assertEqual(grouped.walkLength, 2);
assertEqual(grouped.front.walkLength, 2);
grouped.popFront;
assertEqual(grouped.front.walkLength, 1);

Meta