35 ms·
> And how would you compute the cross product of <"foo", "bar", "baz"> and <"apple", "orange", "banana"> exactly? Cross product isn't a well-defined operation.
by a1369209993 6y ago
> And how would you compute the cross product of <"foo", "bar", "baz"> and <"apple", "orange", "banana"> exactly?
Cross product isn't a well-defined operation. The wedge product[0] would be <a,b,c>~<x,y,z>=<<ay-bx,az-cx,bz-cy>>, assuming I didn't get the signs wrong again. That would require scalar multiplication and subtraction of strings, though, neither of which are generally well-defined.
If you substitute in string multiplication (ie concatentation) and addition of negatives (alternation and reversal, the latter of which is only vaguely justified by anticommutativity of multiplication), you get:
<< /fooorange|elpparab/ ,
/foobanana|elppazab/ ,
/barbanana|egnarozab/ >>
which frankly sounds to me like a pretty good argument that vectors of strings make no sense and shouldn't be supported, but maybe someone working on parsing algebras could come up a more useful interpretation.
0: http://en.wikipedia.org/wiki/Wedge_product http://en.wikipedia.org/wiki/Wedge_product
Edit: FWIW, wedge product of NaN makes perfect sense: <NaN,NaN,NaN> ~ <NaN,NaN,NaN> = <<NaN,NaN,NaN>>.