Jump to content

David Heffernan

Members
  • Content Count

    3512
  • Joined

  • Last visited

  • Days Won

    174

Everything posted by David Heffernan

  1. David Heffernan

    Why is TList freed in this code?

    Only cool for the users. Mind-bending if it's your job to implement it!
  2. David Heffernan

    Why is TList freed in this code?

    Also the owned objects are destroyed when items are removed from the dictionary. This is the same ownership model as the classic TObjectList.
  3. When you said that I thought you meant that you were not able to call libopenblas from Delphi. But then you later said that you were doing that. So I still don't understand that statement. Notwithstanding, I am sure you will be able to work out which library is best suited to your needs.
  4. I'd be astounded if that was not the case. Eigen has a very good reputation. Certainly for basic matrix arithmetic performance is excellent. And I'd be astonished if it could not match openblas for eigensolves. Then I don't know why you asked if it was possible to do something that you were already doing.
  5. That isn't it. Not true. C++ compilers can perform just as well. Possible. But I doubt it. I bet you are asking different questions, and not comparing like with like. Quite simple to call libopenblas from delphi. I do just that.
  6. OK, I see. We'll, I don't really know. It seems odd because they use the same algorithm as I understand it. I imagine there is a good explanation. But there'd need to be more detail.
  7. Your lapack call does not calculate eigen vectors. The eigen call does.
  8. That would be surprising. I wouldn't want to comment without seeing what options you used when calling the functions.
  9. David Heffernan

    Enums and generics

    Unless all of your enumerated types have the same names, it seems like you'd have to provide names for each type.
  10. David Heffernan

    Enums and generics

    You have misunderstood me. The attribute is independent of the type. Therefore it can be used with any type.
  11. David Heffernan

    Enums and generics

    As you can see from the code, the attribute class is called NamesAttribute and is independent from the type. Otherwise the whole thing would be pointless.
  12. David Heffernan

    Enums and generics

    I do this; [Names( 'Curvature', 'Bend angle' )] TPreBendSpecifiedBy = ( pbsCurvature, pbsBendAngle ); and then I can write: Assert(Enum.Name(pbsCurvature) = 'Curvature')) Of course this requires some library code behind it, but it's pretty convenient.
  13. I can’t see past // must call all functions, defeat short circuit evaluation aVal := A(); bVal := B(); cVal := C(); Result := aVal or bVal or cVal; I don’t care for temporarily disabling short circuit evaluation. I’d rather have the predictability of one rule for expression evaluation. Mix and match adds an impedance to understanding for the reader.
  14. Yes. This is what I said in my earlier comments.
  15. The helper is on the node. So you’d need to call vNode.ToInteger(‘Id’). I think you could do with a better name for the helper function.
  16. You have to pass the attribute name to the helper function. Also, don't call GetAttribute twice. Store the return value in a local variable.
  17. ARPACK is recommended for extracting a small number of eigen vectors from a huge problem. LAPACK has effective methods for extracting all solutions using a direct method. Neither are easy to use from Delphi. I have done so but it isn't for the faint of heart. Especially ARPACK. The famous C++ Eigen library is very capable though and easy to use. I'd suggest you wrap that in a DLL. Start in Matlab to prove that it can do the calculation sufficiently quickly for a typical matrix that you will work with. Then write a C++ program in Eigen to solve the same problems. Does that work effectively? Then, and only then, try to wrap it up to be called from Delphi.
  18. It wasn't aimed at the OP. It was aimed at all the misleading posters who guessed and speculated. In my opinion it is those posts that are harmful to the OP's chance of progress. This topic requires knowledge of numerical methods for solving eigenproblems. Most of the posts have not lived up to that.
  19. Why does anybody think that all this guessing would be useful? Does anybody have much experience of success when guessing? Solving eigen problems is a very challenging numerical problem. Does anybody really believe that good solutions arise from guesswork? I am frankly embarrassed by this thread.
  20. It is practical. It is routine to solve eigen problems for systems of thousands of variables.
  21. @Kas Ob.It's pointless trying to argue about making the wrong solution work.
  22. Try other compilers isn't going to make any difference here. Other compilers will face the same problems. I am reasonably confident that the correct way forward is to use the right tool for the job. And root finding of the characteristic polynomial is not the way to find eigenvalues on a finite computer.
  23. If your goal is to find eigenvalues then you should use a dedicated library for that. There are a good few about that can handle matrices with sizes in the thousands. It sounds like you are trying to find roots of the characteristic polynomial. This is not a robust approach.
  24. David Heffernan

    System.GetMemory returning NIL

    I don't need to. I'm not the one making the claim that all huge memory allocations should be made using VirtualAlloc. It's you that is making that claim.
  25. David Heffernan

    When can Class.Create fail?

    Well not necessarily. Typically you let exceptions float upwards to be handled by some high level exception handler.
×