MemoizR 0.0.3-beta-1

This is a prerelease version of MemoizR.
There is a newer version of this package available.
See the version list below for details.
dotnet add package MemoizR --version 0.0.3-beta-1
                    
NuGet\Install-Package MemoizR -Version 0.0.3-beta-1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MemoizR" Version="0.0.3-beta-1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MemoizR" Version="0.0.3-beta-1" />
                    
Directory.Packages.props
<PackageReference Include="MemoizR" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MemoizR --version 0.0.3-beta-1
                    
#r "nuget: MemoizR, 0.0.3-beta-1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MemoizR@0.0.3-beta-1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MemoizR&version=0.0.3-beta-1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=MemoizR&version=0.0.3-beta-1&prerelease
                    
Install as a Cake Tool

With this package it is possible to build a dependency graph that does dynamic lazy memoization. It calculates only the values that are needed and also only when they are not already calculated (memoization).

  /*
     Initialize Graph without evaluation
        v1
        | \ 
       m1  m2
         \ |
          m3
  */
var f = new MemoFactory();
var v1 = f.CreateMemoSetR(1, "v1");
var m1 = f.CreateMemoizR(() => v1.Get(), "m1");
var m2 = f.CreateMemoizR(() => v1.Get() * 2, "m2");
var m3 = f.CreateMemoizR(() => m1.Get() + m2.Get(), "m3");

// Get Values
m3.Get(); // calc  m1 + 2 * m1 => ( 1 + 2 * 1 ) = 3

// Change
v1.Set(2); // Set is not triggering evaluation of graph
m3.Get(); // calc  m1 + 2 * m1 => ( 1 + 2 * 1 ) = 6
m3.Get(); // noop => 6

v1.Set(3); // Set is not triggering evaluation of graph
v1.Set(2); // Set is not triggering evaluation of graph
m3.Get(); // noop => 6 ( because the last time the Graph was evaluated v1 was already 2 )

It also works if the Graph is not stable at runtime. MemoizR can handle if the Graph changes like:

var m3 = f.CreateMemoizR(() => v1.Get() ? m1.Get() : m2.Get());
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on MemoizR:

Package Downloads
MemoizR.Reactive

Package Description

MemoizR.StructuredConcurrency

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.6 135 11/27/2024
0.1.5 155 11/17/2024
0.1.4 184 5/25/2024
0.1.3 154 5/7/2024
0.1.2 166 5/6/2024
0.1.1 122 5/1/2024
0.1.1-rc.11 84 4/29/2024
0.1.1-rc.10 78 4/23/2024
0.1.1-rc.9 80 4/18/2024
0.1.1-rc.8 80 4/13/2024
0.1.1-rc.7 82 4/11/2024
0.1.1-rc.6 78 4/10/2024
0.1.1-rc.5 76 4/4/2024
0.1.1-rc.4 77 4/1/2024
0.1.1-rc.3 98 3/24/2024
0.1.1-rc.2 91 2/17/2024
0.1.1-rc.1 202 1/4/2024
0.1.0-rc9 219 11/6/2023
0.1.0-rc8 196 10/26/2023
0.1.0-rc7 167 10/24/2023
0.1.0-rc6 227 10/21/2023
0.1.0-rc5 154 10/19/2023
0.1.0-rc4 176 10/14/2023
0.1.0-rc3 165 10/13/2023
0.1.0-rc2 162 10/11/2023
0.1.0-rc10 143 11/12/2023
0.1.0-rc1 163 10/10/2023
0.1.0-rc.11 90 1/4/2024
0.1.0-alpha2 164 10/6/2023
0.1.0-alpha1 150 10/6/2023
0.0.4-rc4 168 9/24/2023
0.0.4-rc3 149 9/23/2023
0.0.4-rc2 142 9/23/2023
0.0.4-rc1 150 9/22/2023
0.0.4-beta1 151 9/21/2023
0.0.4-alpha1 144 9/19/2023
0.0.3-beta-1 136 9/15/2023
0.0.2-rc4 120 8/30/2023
0.0.2-rc3 141 8/30/2023
0.0.2-rc2 140 8/30/2023
0.0.2-rc1 138 8/30/2023
0.0.2-beta2 145 8/30/2023
0.0.2-beta1 147 8/29/2023
0.0.1-beta1 133 8/28/2023
0.0.1-alpha2 146 8/28/2023
0.0.1-alpha1 141 8/27/2023