Inverse matrix computation

  • 状态 完成的
  • 预算 $10 - $30 USD
  • 总竞标 8

项目描述

Write C function to compute inverse matrix of square matrix, such that

if Y = M^-1 then M * Y = E.

Function must have following interface:

double* inv_matrix(const double* M, const size_t N);

Inputs:

N - size of matrix side

M - matrix data (standard C array of N * N)

Outputs:

Function must allocate memory with malloc(), compute inverse matrix,

store it in the newly allocated area and return it. If inverse matrix does not exist,

function must deallocate that memory and return NULL.

Function must also return NULL if memory allocation failed, or if n is zero.

In the latter case, memory should not be allocated at all.

Function is NOT allowed to modify its input.

Special conditions:

- You are not allowed to use any third-party libraries. Maximum you can use

is functions available in the standard header file math.h

- Function must use most effective algorithm that will work well for matrix sizes N up to 10000.

- Function must be failsafe and memory leak free.

- Function must be written in the plain C language (STRICTLY NO C++!!!) and comply to C99 language standard.

- Function must compile without any warnings or errors on GCC 4.8.5 using following set of compiler options:

-std=c99 -Wall -Wextra -pedantic -Werror

- All code must be formatted according to Linux Kernel coding standard

(see here for more details: [url removed, login to view])

- You must provide small test program that execute at least 10 test cases to prove correctness

(we strongly recommend you to use Matlab or Octave to precompute your test data).

获得类似项目的报价
完成的:
要求的技能

想赚钱吗?

  • 设置你的预算和期限
  • 列出你的提案
  • 获得工资

雇用同样在该项目上竞标的威客

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online