Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8894275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:27:17+00:00 2026-06-14T23:27:17+00:00

While there are plenty of java libraries for linear algebra, Clojure currently does not

  • 0

While there are plenty of java libraries for linear algebra, Clojure currently does not have an idiomatic computer algebra system that would include support for symbolic math. As a start I figure I can start working on something simple.

As a first step, I think getting the data structures right would be a good start.

Step 1: Implement a persistent matrix

I will be using deftype (or reify), and for now, for ease of implementation, I will use a hashmap for storage (Please suggest an alternative if think its better but state tradeoffs). (One can imagine many different implementations depending on your performance requirements, such as using arrays or delegating to an external java library and implementing some sort of transients interface.)

My question is, what interfaces/protocols should I be considering to implement? (In general, what is a good listing of all the protocols/interfaces that clojure uses?) Also is there any advice on how to implement these?

My list of things to implement:

-Assoc’ing would be useful, to modify sections of the matrix in an immutable manner

-treating the matrix as a function as an accessor of the elements, I was thinking you could pass a two-tuple to return a single element, a single value (index by width*y+x), hashmap to get columns, rows, or minor, via custom query hashmap/language.

Note, my goal at the moment is to design good abstractions that enable flexibility in choosing implementations.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:27:18+00:00Added an answer on June 14, 2026 at 11:27 pm

    I more or less manage the linear algebra modules in SymPy, a major Python symbolics package. I’ll give you my perspective coming from a traditional computer algebra system.

    We have three separate implementations for three important use cases

    1. Mutable matrices — Despite being in Python SymPy is immutable by default. We’ve actually broken this rule for matrices. Matrix algorithms are the standard example of where you really need to switch to mutability for performance reasons.
    2. Immutable matrices — But you’d like to have the option to switch back. Our intended workflow is as follows

      1. Build an immutable matrix
      2. Switch to mutability and perform some algorithm
      3. Switch back to immutability and present this to the user
    3. Matrix Symbols — Often you don’t need to deal with explicit entries in the matrix but would rather deal with the idea of a matrix. See this scicomp.stackexchange post. This is my current work and I find it to be very exciting.

    There are other splits like dense representations vs sparsity. Symbolic linear algebra is a big and important field. I look forward to seeing the Clojure community’s collective solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There are plenty of multipart/form-data file upload solutions out there, but I have not
While there are many guides for Browser Helper Objects, i have a hard time
I know there have been plenty of questions about this, but I've been trying
While there is plenty of documentation about XML document structure, there are very few
While there are many good online and offline tools for testing regular expressions, I
While there are a handful of great programs for ISV Startups (BizSpark, Emplower ISV,
While there are multiple ways to reverse bit order in a byte, I'm curious
I can't wget while there is no path already to save. I mean, wget
I'm new at javascript and while there are many more complex solutions, I don't
I'm new to coffeescript, and while there is extensive information concerning the proper method

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.