@@ -62,12 +62,12 @@ - init { Class c = isa; [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: c + selector: _cmd]; } - initWithDimension: (size_t)dimension_ { self = [super init]; @@ -74,16 +74,16 @@ @try { dimension = dimension_; if (SIZE_MAX / dimension < sizeof(double)) - @throw [OFOutOfRangeException newWithClass: isa]; + @throw [OFOutOfRangeException exceptionWithClass: isa]; if ((data = malloc(dimension * sizeof(double))) == NULL) @throw [OFOutOfMemoryException - newWithClass: isa - requestedSize: dimension * sizeof(double)]; + exceptionWithClass: isa + requestedSize: dimension * sizeof(double)]; memset(data, 0, dimension * sizeof(double)); } @catch (id e) { [self release]; @throw e; @@ -117,16 +117,16 @@ size_t i; dimension = dimension_; if (SIZE_MAX / dimension < sizeof(double)) - @throw [OFOutOfRangeException newWithClass: isa]; + @throw [OFOutOfRangeException exceptionWithClass: isa]; if ((data = malloc(dimension * sizeof(double))) == NULL) @throw [OFOutOfMemoryException - newWithClass: isa - requestedSize: dimension * sizeof(double)]; + exceptionWithClass: isa + requestedSize: dimension * sizeof(double)]; data[0] = data_; for (i = 1; i < dimension; i++) data[i] = va_arg(arguments, double); } @catch (id e) { @@ -146,19 +146,19 @@ - (void)setValue: (double)value atIndex: (size_t)index { if (index >= dimension) - @throw [OFOutOfRangeException newWithClass: isa]; + @throw [OFOutOfRangeException exceptionWithClass: isa]; data[index] = value; } - (double)valueAtIndex: (size_t)index { if (index >= dimension) - @throw [OFOutOfRangeException newWithClass: isa]; + @throw [OFOutOfRangeException exceptionWithClass: isa]; return data[index]; } - (size_t)dimension @@ -170,13 +170,13 @@ { double *newData; size_t i; if ((newData = realloc(data, dimension_ * sizeof(double))) == NULL) - @throw [OFOutOfMemoryException newWithClass: isa - requestedSize: dimension_ * - sizeof(double)]; + @throw [OFOutOfMemoryException + exceptionWithClass: isa + requestedSize: dimension_ * sizeof(double)]; data = newData; for (i = dimension; i < dimension_; i++) data[i] = 0; @@ -295,12 +295,12 @@ - (void)addVector: (OFDoubleVector*)vector { size_t i; if (vector->isa != isa || vector->dimension != dimension) - @throw [OFInvalidArgumentException newWithClass: isa - selector: _cmd]; + @throw [OFInvalidArgumentException exceptionWithClass: isa + selector: _cmd]; for (i = 0; i < dimension; i++) data[i] += vector->data[i]; } @@ -307,12 +307,12 @@ - (void)subtractVector: (OFDoubleVector*)vector { size_t i; if (vector->isa != isa || vector->dimension != dimension) - @throw [OFInvalidArgumentException newWithClass: isa - selector: _cmd]; + @throw [OFInvalidArgumentException exceptionWithClass: isa + selector: _cmd]; for (i = 0; i < dimension; i++) data[i] -= vector->data[i]; } @@ -335,12 +335,12 @@ - (void)multiplyWithComponentsOfVector: (OFDoubleVector*)vector { size_t i; if (vector->isa != isa || vector->dimension != dimension) - @throw [OFInvalidArgumentException newWithClass: isa - selector: _cmd]; + @throw [OFInvalidArgumentException exceptionWithClass: isa + selector: _cmd]; for (i = 0; i < dimension; i++) data[i] *= vector->data[i]; } @@ -347,12 +347,12 @@ - (void)divideByComponentsOfVector: (OFDoubleVector*)vector { size_t i; if (vector->isa != isa || vector->dimension != dimension) - @throw [OFInvalidArgumentException newWithClass: isa - selector: _cmd]; + @throw [OFInvalidArgumentException exceptionWithClass: isa + selector: _cmd]; for (i = 0; i < dimension; i++) data[i] /= vector->data[i]; } @@ -360,12 +360,12 @@ { double dotProduct; size_t i; if (vector->isa != isa || vector->dimension != dimension) - @throw [OFInvalidArgumentException newWithClass: isa - selector: _cmd]; + @throw [OFInvalidArgumentException exceptionWithClass: isa + selector: _cmd]; dotProduct = 0.0; for (i = 0; i < dimension; i++) dotProduct += data[i] * vector->data[i]; @@ -376,16 +376,16 @@ - (OFDoubleVector*)crossProductWithVector: (OFDoubleVector*)vector { OFDoubleVector *crossProduct; if (dimension != 3) - @throw [OFNotImplementedException newWithClass: isa - selector: _cmd]; + @throw [OFNotImplementedException exceptionWithClass: isa + selector: _cmd]; if (vector->dimension != dimension) - @throw [OFInvalidArgumentException newWithClass: isa - selector: _cmd]; + @throw [OFInvalidArgumentException exceptionWithClass: isa + selector: _cmd]; crossProduct = [OFDoubleVector vectorWithDimension: 3]; crossProduct->data[0] = data[1] * vector->data[2] - data[2] * vector->data[1]; @@ -401,17 +401,17 @@ { double *newData; size_t i, j, k; if (matrix->isa != doubleMatrix || dimension != matrix->columns) - @throw [OFInvalidArgumentException newWithClass: isa - selector: _cmd]; + @throw [OFInvalidArgumentException exceptionWithClass: isa + selector: _cmd]; if ((newData = malloc(matrix->rows * sizeof(double))) == NULL) @throw [OFOutOfMemoryException - newWithClass: isa - requestedSize: matrix->rows * sizeof(double)]; + exceptionWithClass: isa + requestedSize: matrix->rows * sizeof(double)]; memset(newData, 0, matrix->rows * sizeof(double)); for (i = j = k = 0; i < matrix->rows * matrix->columns; i++) { newData[j] += matrix->data[i] * data[k];