Beispiel #1
0
 down () {
   this.board = transpose(this.board)
   this.board.forEach((row) => row.reverse())    
   this.moveLeft()
   this.board.forEach((row) => row.reverse())
   this.board = transpose(this.board)
 }
Beispiel #2
0
function calcgdt(seq1, seq2, equiv, rmsdc) {
  var num;
  var perc;
  var rmsdloc;
  var rmsdall;
  var eqseq1, eqseq2;

  var res;

  eqseq1 = makeeqseq(seq1, equiv.equiv.exp);
  eqseq2 = makeeqseq(seq2, equiv.equiv.tgt);

  res = {
    num: equiv.len,
    perc: caperc(seq1, seq2, equiv),
    rmsdloc: rmsdc(transpose(eqseq1), transpose(eqseq2)),
    rmsdall: rmsdc(transpose(seq1), transpose(seq2))
  };

  return res;
}
Beispiel #3
0
function computeMin (x0) {
  var status = {};
  var x1 = minimize(function (x) {
    return f.evaluate({x: x[0], y: x[1]});
  }, x0, {maxIter: 50}, status);

  return {
    points: transpose(status.points),
    x0: x0,
    x1: x1
  };
}
Beispiel #4
0
function computer(seq1, seq2) {
  return mmult(seq2, transpose(seq1));
}
Beispiel #5
0
 up () {
   this.board = transpose(this.board)
   this.moveLeft()
   this.board = transpose(this.board)
 }
Beispiel #6
0
/** compute-r **/
function computer(m1, m2) {
	return mmult(m2, transpose(m1));
}