Ad
Code
Diff
  • double Matrix::GetValueOfDeterminant(){
    if((2 == MaxRow)&&(2 == MaxCol)){
    return GetElement(1,1)*GetElement(2,2)- GetElement(1,2)*GetElement(2,1);}
    else{double ResultValue = 0;for(int c = 1;c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
    ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}return ResultValue;}}
    • double Matrix::GetValueOfDeterminant(){
    • if((2 == MaxRow)&&(2 == MaxCol)){
    • return GetElement(1,1)*GetElement(2,2)- GetElement(1,2)*GetElement(2,1);}
    • else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
    • else{double ResultValue = 0;for(int c = 1;c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
    • ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}return ResultValue;}}
Code
Diff
  • double Matrix::GetValueOfDeterminant(){
    if((2 == MaxRow)&&(2 == MaxCol)){
    return GetElement(1,1)*GetElement(2,2)- GetElement(1,2)*GetElement(2,1);}
    else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
    ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}return ResultValue;}}
    • double Matrix::GetValueOfDeterminant(){
    • if((2 == MaxRow)&&(2 == MaxCol)){
    • return GetElement(1,1)*GetElement(2,2)- GetElement(1,2)* GetElement(2,1);}
    • return GetElement(1,1)*GetElement(2,2)- GetElement(1,2)*GetElement(2,1);}
    • else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
    • ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}return ResultValue;}}
Code
Diff
  • double Matrix::GetValueOfDeterminant(){
    if((2 == MaxRow)&&(2 == MaxCol)){
    return GetElement(1,1)*GetElement(2,2)- GetElement(1,2)* GetElement(2,1);}
    else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
    ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}return ResultValue;}}
    • double Matrix::GetValueOfDeterminant(){
    • if((2 == MaxRow)&&(2 == MaxCol)){
    • return GetElement(1,1)*GetElement(2,2)- GetElement(1,2) * GetElement(2,1);}
    • return GetElement(1,1)*GetElement(2,2)- GetElement(1,2)* GetElement(2,1);}
    • else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
    • ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}return ResultValue;}}
Code
Diff
  • double Matrix::GetValueOfDeterminant(){
    if((2 == MaxRow)&&(2 == MaxCol)){
    return GetElement(1,1)*GetElement(2,2)- GetElement(1,2) * GetElement(2,1);}
    else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
    ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}return ResultValue;}}
    • double Matrix::GetValueOfDeterminant(){
    • if((2 == MaxRow)&&(2 == MaxCol)){
    • return GetElement(1,1)*GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
    • return GetElement(1,1)*GetElement(2,2)- GetElement(1,2) * GetElement(2,1);}
    • else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
    • ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}return ResultValue;}}
Code
Diff
  • double Matrix::GetValueOfDeterminant(){
    if((2 == MaxRow)&&(2 == MaxCol)){
    return GetElement(1,1)*GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
    else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
    ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}return ResultValue;}}
    • double Matrix::GetValueOfDeterminant(){
    • if((2 == MaxRow)&&(2 == MaxCol)){
    • return GetElement(1,1)* GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
    • return GetElement(1,1)*GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
    • else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
    • ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}return ResultValue;}}
double Matrix::GetValueOfDeterminant(){
if((2 == MaxRow)&&(2 == MaxCol)){
return GetElement(1,1)* GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}return ResultValue;}}
Code
Diff
  • double Matrix::GetValueOfDeterminant(){
    if((2 == MaxRow)&&(2 == MaxCol)){
    return GetElement(1,1) * GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
    else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
    ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}return ResultValue;}}
    • double Matrix::GetValueOfDeterminant(){
    • if((2 == MaxRow)&& (2 == MaxCol)){
    • if((2 == MaxRow)&&(2 == MaxCol)){
    • return GetElement(1,1) * GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
    • else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
    • ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}return ResultValue;}}
Code
Diff
  • double Matrix::GetValueOfDeterminant(){
    if((2 == MaxRow)&& (2 == MaxCol)){
    return GetElement(1,1) * GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
    else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
    ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}return ResultValue;}}
    • double Matrix::GetValueOfDeterminant(){
    • if((2 == MaxRow) && (2 == MaxCol)){
    • if((2 == MaxRow)&& (2 == MaxCol)){
    • return GetElement(1,1) * GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
    • else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
    • ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}return ResultValue;}}
Code
Diff
  • double Matrix::GetValueOfDeterminant(){
    if((2 == MaxRow) && (2 == MaxCol)){
    return GetElement(1,1) * GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
    else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
    ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}return ResultValue;}}
    • double Matrix::GetValueOfDeterminant(){
    • if((2 == MaxRow) && (2 == MaxCol)){
    • return GetElement(1,1) * GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
    • else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
    • ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}
    • return ResultValue;}}
    • ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}return ResultValue;}}
Code
Diff
  • double Matrix::GetValueOfDeterminant(){
    if((2 == MaxRow) && (2 == MaxCol)){
    return GetElement(1,1) * GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
    else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
    ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}
    return ResultValue;}}
    • double Matrix::GetValueOfDeterminant(){
    • if((2 == MaxRow) && (2 == MaxCol)){
    • return GetElement(1,1) * GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
    • else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){
    • int PowOfNegativeOne = std::pow(-1, c);
    • else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){int PowOfNegativeOne = std::pow(-1, c);
    • ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}
    • return ResultValue;}}
Code
Diff
  • double Matrix::GetValueOfDeterminant(){
    if((2 == MaxRow) && (2 == MaxCol)){
    return GetElement(1,1) * GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
    else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){
    int PowOfNegativeOne = std::pow(-1, c);
    ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}
    return ResultValue;}}
    • double Matrix::GetValueOfDeterminant(){
    • if((2 == MaxRow) && (2 == MaxCol)){
    • return GetElement(1,1) * GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
    • else{double ResultValue = 0;
    • for(int c = 1; c <= MaxCol; c++){
    • else{double ResultValue = 0;for(int c = 1; c <= MaxCol; c++){
    • int PowOfNegativeOne = std::pow(-1, c);
    • ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}
    • return ResultValue;}}
Code
Diff
  • double Matrix::GetValueOfDeterminant(){
    if((2 == MaxRow) && (2 == MaxCol)){
    return GetElement(1,1) * GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
    else{double ResultValue = 0;
    for(int c = 1; c <= MaxCol; c++){
    int PowOfNegativeOne = std::pow(-1, c);
    ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}
    return ResultValue;}}
    • double Matrix::GetValueOfDeterminant(){
    • if((2 == MaxRow) && (2 == MaxCol)){
    • return GetElement(1,1) * GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
    • else{
    • double ResultValue = 0;
    • else{double ResultValue = 0;
    • for(int c = 1; c <= MaxCol; c++){
    • int PowOfNegativeOne = std::pow(-1, c);
    • ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}
    • return ResultValue;}}
Code
Diff
  • function fizzBuzz(n){for(let i=1;i<=n;i++)console.log((i%3 ?'':'fizz')+(i%5 ?'':'buzz')||i)}
    • function fizzBuzz(n){for (let i=1;i<=n;i++)console.log((i%3 ?'':'fizz')+(i%5 ?'':'buzz')||i)}
    • function fizzBuzz(n){for(let i=1;i<=n;i++)console.log((i%3 ?'':'fizz')+(i%5 ?'':'buzz')||i)}
Code
Diff
  • double Matrix::GetValueOfDeterminant(){
    if((2 == MaxRow) && (2 == MaxCol)){
    return GetElement(1,1) * GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
    else{
    double ResultValue = 0;
    for(int c = 1; c <= MaxCol; c++){
    int PowOfNegativeOne = std::pow(-1, c);
    ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}
    return ResultValue;}}
    • //We have Matrix Matrix::GetCofactorMatrix() to return cofactor matrix
    • //double & Matrix::GetElement(int _Row, int _Col) to return _Row and _Col of double element of matrix
    • double Matrix::GetValueOfDeterminant()
    • {
    • if((2 == MaxRow) && (2 == MaxCol)){
    • return GetElement(1,1) * GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
    • else{
    • double ResultValue = 0;
    • for(int c = 1; c <= MaxCol; c++){
    • int PowOfNegativeOne = std::pow(-1, c);
    • ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}
    • return ResultValue; }
    • }
    • double Matrix::GetValueOfDeterminant(){
    • if((2 == MaxRow) && (2 == MaxCol)){
    • return GetElement(1,1) * GetElement(2,2) - GetElement(1,2) * GetElement(2,1);}
    • else{
    • double ResultValue = 0;
    • for(int c = 1; c <= MaxCol; c++){
    • int PowOfNegativeOne = std::pow(-1, c);
    • ResultValue += GetCofactorMatrix(1,c).GetValueOfDeterminant() * GetElement(1,c) * PowOfNegativeOne;}
    • return ResultValue;}}
Code
Diff
  • def find_only(values):return sorted(set(values),key=lambda x: values.count(x))[0]
    • def find_only(values):
    • return sorted(set(values), key=lambda x: values.count(x))[0]
    • def find_only(values):return sorted(set(values),key=lambda x: values.count(x))[0]
Loading more items...