Questions tagged [inverse]

In mathematics, a function y=f(x) tells us how to map input x to output y. Inverting a function (or an operator) is attempting to find a function f¯¹ that maps y to x, such that x=f¯¹(f(x)).

In mathematics, a function y = f(x) tells us how to map input x to output y. Inverting a function (or an operator) is attempting to find a function f -1 that maps y to x, such that x = f -1( f(x) ).

It is not always possible to find the inverse map, and sometimes it does not even exist.

One of the most common inverse problems is inverting an n × n matrix: only square matrices A with det(A) ≠ 0 have an inverse matrix A-1. See .

474 questions
3
votes
1 answer

sympy.solve() doesn't give one of the solutions with LambertW

Background: I am trying to implement a function doing an inverse transform sampling. I use sympy for calculating CDF and getting its inverse function. While for some simple PDFs I get correct results, for a PDF which CDF's inverse function includes…
Georgy
  • 12,464
  • 7
  • 65
  • 73
3
votes
2 answers

Armadillo C++ doesn't find matrix inverse

I'm using Armadillo & C++ and I'm trying to find the inverse of a Matrix, however, the inverse just returns the matrix itself. It seems to me that there isn't any computation. Also, there are no errors thrown. I am using the following…
3
votes
2 answers

Invert a series of data as if inverting a function using MATLAB

Is it possible to "invert" a series of data like when a function is inverted? Let me explain. If I have a function that I can plot in MATLAB, I can always (almost) find the inverse of such function with the finverse and the plot would provide…
Meclassic
  • 209
  • 2
  • 5
3
votes
2 answers

Inverting a matrix of any size

I'm using the GNU Scientific Library in implementing a calculator which needs to be able to raise matrices to powers. Unfortunately, there doesn't seem to be such a function available in the GSL for even multiplying matrices (the…
2mac
  • 1,609
  • 5
  • 20
  • 35
3
votes
3 answers

Is it possible to write a function in haskell: (r -> [a]) -> [r -> a])?

Its inverse seems possible. Since I imagine lists are products and -> is exponentiation, (a*a*a...)^r = (a^r)*(a^r).... Since we can define the inverse [a->r] -> a -> [r] shouldn't it be possible to define this?
user3585010
  • 135
  • 4
3
votes
2 answers

SML inverse list with accumulator list

I'm tring to do a function on SML that invert the first list and then concatenate with the second list (someting like: list1 = [5,3,1] and list 2 = [ 6 7 8], then inv(list1,list2) = [ 1,3,5,6,7,8].) Here's the code: fun inv (nil,nil) = [] |inv…
Breno Santos
  • 174
  • 1
  • 3
  • 12
3
votes
1 answer

iOS CoreData inverse relationships to itself

I am trying to build a CoreData model similar to Twitter user when User can have many other users who follows him and many other users followed by him. I attached the model that I have tried to use but seems it is getting to complicating to retrieve…
Kostia Kim
  • 469
  • 1
  • 6
  • 19
3
votes
4 answers

How to get the inverse of a regular expression?

Let's say I have a regular expression that works correctly to find all of the URLs in a text file: (http://)([a-zA-Z0-9\/\.])* If what I want is not the URLs but the inverse - all other text except the URLs - is there an easy modification to make…
boysenberry
  • 87
  • 1
  • 2
  • 7
3
votes
1 answer

Fast integer division via calculating and storing inverses?

From what I understand, the current method of doing integer division is calculating the inverse in hardware and then performing a multiplication. I have some C# code where a ton of time is being spent in integer division, with values that are…
Chuu
  • 4,301
  • 2
  • 28
  • 54
2
votes
2 answers

Regex: match everything before image

url1: /dir-images/no1/top-left.gif url2: /test-1/test-2/test I want to match the path before the last slash if it is an image file(url1), aka /dir-images/no1/ and match the whole path if it is not(url2), /test-1/test-2/test tried ^([\=\/\.\w-]+\/)+…
FEi.TH
  • 91
  • 1
  • 6
2
votes
1 answer

does not Core Data Automatically take care with inverse relationships

I have 3 entities like this: sorry that this image has a problem that the "day" relationship of "Week" entity should be to-many, there should be 2 arrows on the end of the relationship now here comes 2 questions. 1st. For any Day-Class (Customized…
Wang Liang
  • 941
  • 2
  • 15
  • 34
2
votes
4 answers

Creating java regex to get href link

Sorry if this has been asked before, but I couldn't find any answers on the web. I'm having a hard time figuring out the inverse to this regex: "\"[^>]*\">" I want to use replaceAll to replace everything except the link. So if I had a tag…
user1070866
  • 21
  • 1
  • 1
  • 2
2
votes
4 answers

PersistenceSpecification and inverse

I've already posted this in the Fluent NH group a long time ago, but didn't get any answers until today. SO, here's the problem: I've got a one-to-many relationship defined and the one side has the inverse flag set. the mapping code looks something…
Luis Abreu
  • 4,008
  • 9
  • 34
  • 63
2
votes
2 answers

I´m looking for a way to inverse the values of 2 columns of a row when this inverse exists in the dataframe?

Here is my dataframe: DF <- data.frame( VAR1 = c("A", "A", "B", "B", "B", "C", "C"), VAR2 = c("B", "C", "A", "D", "C", "B", "D"), VAR3 = c(1, 1, 1, 2, 4, 6, 4) ) I would like to have this: VAR1 VAR2 VAR3 A B 2 A C …
Jeremy
  • 23
  • 6
2
votes
1 answer

Why pinv answer not equal with svd method answer in Matlab?

a = [1 2 3 2 4 6 3 6 9]; b = pinv(a); [U,S,V] = svd(a); T = S; T(find(S~=0)) = 1./S(find(S~=0)); svda = V * T' * U'; I find that the pinv method in Matlab uses the SVD decomposition to calculate pseudo-inverse, so I tried to solve the…