GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Lina Inver?e (lina@eientei.org)'s status on Thursday, 16-Jan-2025 16:09:44 JST Lina Inver?e Lina Inver?e
    in reply to
    • Not Elon Musk
    @xy nigga that's nuts :nuts:
    In conversation about 4 months ago from eientei.org permalink
    • Embed this notice
      Not Elon Musk (xy@mastodon.mit.edu)'s status on Thursday, 16-Jan-2025 16:09:45 JST Not Elon Musk Not Elon Musk
      in reply to

      And here's a Fenwick the squirrel who I folded 1.5 years ago. I guess his name is because he lives in a Fenwick tree or something. When I folded him last year, I told my friends there was a squirrel in my room and they thought a real squirrel was running around wrecking havok in my room 🤣

      In conversation about 4 months ago permalink

      Attachments


      1. https://mastodon.mit.edu/system/media_attachments/files/113/825/175/118/819/094/original/8b5812b3262aa47c.jpeg
    • Embed this notice
      Not Elon Musk (xy@mastodon.mit.edu)'s status on Thursday, 16-Jan-2025 16:09:46 JST Not Elon Musk Not Elon Musk
      in reply to

      I haven't done benchmarks to confirm this, but Fenwick trees should use 1/4 the memory of segtrees and be somewhat faster since they use for loops and bit hacks instead of recursion.

      In conversation about 4 months ago permalink
    • Embed this notice
      Not Elon Musk (xy@mastodon.mit.edu)'s status on Thursday, 16-Jan-2025 16:09:46 JST Not Elon Musk Not Elon Musk
      in reply to

      The other weird thing about the "search for largest index with prefix sum less than or equal to s" operation is that it views the Fenwick array as an implicit binary tree while the update and query ops view the array as (two different) binomial trees. So maybe the tagline for Fenwick trees should be "One array. Three trees."

      In conversation about 4 months ago permalink
    • Embed this notice
      Not Elon Musk (xy@mastodon.mit.edu)'s status on Thursday, 16-Jan-2025 16:09:47 JST Not Elon Musk Not Elon Musk

      I wrote a fast Fenwick tree library for my flash cards app: https://git.unnamed.website/sdc/tree/fenwick.c

      The operation "Search for largest index with prefix sum less than or equal to s" isn't a common thing that people do with Fenwick trees so I had to read an arXiv paper about it.

      The nice thing about Fenwick trees is that they're only a few lines of code but... on the other hand they use crazy incomprehensive bit hacks!

      In conversation about 4 months ago permalink

      Attachments


Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.