>>
>> IEEE 754 floats always in the same order.
>>
>> p = 2.71828;
>> fprintf (stdout, "%x", *(unsigned long *)&p);
>>
>> Produces 402df84d on both my PPC and Intel Mac.
>
> Of course it does. Both long and float use the same byte order within
> the same CPU. That's all your test shows. Try doing t
On Thu, Apr 2, 2009 at 6:58 PM, James Maxwell
wrote:
> Just a quick update... If I do this:
>
> const float *markovBytes = (float *)[coder
> decodeBytesForKey:@"normalizedMarkovGraph" returnedLength:&mGraphSize];
> [self setNormalizedMarkovGraph:[NSData dataWithBytes:markovBytes
> length:mGraphSiz
Just a quick update... If I do this:
const float *markovBytes = (float *)[coder
decodeBytesForKey:@"normalizedMarkovGraph" returnedLength:&mGraphSize];
[self setNormalizedMarkovGraph:[NSData dataWithBytes:markovBytes
length:mGraphSize]];
it seems to work (it doesn't raise an exception). Don
I'm having some real trouble with encoding/decoding a 2D float matrix
wrapped in an NSData.
I'm doing this:
- (void)encodeWithCoder:(NSCoder*) coder
{
NSUInteger mGraphSize = self containerNode] spatialPooler]
quantizationCentres] count] * self containerNode