Permalink
Browse files

added first convention rules

  • Loading branch information...
1 parent 2f5dc49 commit cf6ef4ed0e5b7902598efa5916972af1245649e2 @fibo committed Feb 12, 2013
Showing with 17 additions and 3 deletions.
  1. +10 −0 lib/Complex/Field.js
  2. +3 −0 lib/Real/GeneralLinearGroup.js
  3. +4 −3 lib/Real/VectorSpace.js
View
@@ -4,27 +4,37 @@ var util = require('util');
var Field = require('../Field.js');
var Complex = require('./Element.js');
+//-----------------------------------------------------------------------------
+
var ComplexField = function () {
var self = this;
};
util.inherits(ComplexField, Field);
+//-----------------------------------------------------------------------------
+function getZero() {
+ return new Complex(0); };
ComplexField.prototype.getZero = function () { return new Complex(0); };
+//-----------------------------------------------------------------------------
ComplexField.prototype.getOne = function () { return new Complex(1); };
+//-----------------------------------------------------------------------------
ComplexField.prototype.getMinusOne = function () {
return new Complex(-1);
};
+//-----------------------------------------------------------------------------
ComplexField.prototype.getI = function () {
return new Complex(0, 1);
};
+//-----------------------------------------------------------------------------
ComplexField.prototype.getMinusI = function () {
return new Complex(0, -1);
};
+//-----------------------------------------------------------------------------
module.exports = ComplexField;
@@ -88,5 +88,8 @@ function RealGeneralLinearGroup(order) {
};
+// TODO util.inherits(RealGeneralLinearGroup, GeneralLinearGroup);
+// e a sua volta util.inherits(GeneralLinearGroup, Group);
+
module.exports = RealGeneralLinearGroup;
View
@@ -1,4 +1,6 @@
+var util = require('util');
+
var RealElement = require('./Element.js');
var RealField = require('./Field.js');
var RealVector = require('./Vector.js');
@@ -16,7 +18,6 @@ function RealVectorSpace(dim) {
VectorSpace.call(self, arg);
-
//-----------------------------------------------------------------------------
self.Vector = function Vector() {
@@ -35,9 +36,9 @@ function RealVectorSpace(dim) {
//-----------------------------------------------------------------------------
-}
+};
-RealVectorSpace.prototype = VectorSpace.prototype;
+util.inherits(RealVectorSpace, VectorSpace);
module.exports = RealVectorSpace;

0 comments on commit cf6ef4e

Please sign in to comment.