Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
sampledlossfunction< BSDF, REFERENCE, SAMPLELOSSFUNC, LINEARIZER, COMPONENT, UNIT > Struct Template Reference

sampledlossfunction More...

#include <sampledlossfunction.h>

Inherited by bieronL2< BSDF, REFERENCE, COMPONENT, UNIT >, bieronLog< BSDF, REFERENCE, COMPONENT, UNIT >, lowL2< BSDF, REFERENCE, COMPONENT, UNIT >, lowLog< BSDF, REFERENCE, COMPONENT, UNIT >, nganL2< BSDF, REFERENCE, COMPONENT, UNIT >, and standardLog< BSDF, REFERENCE, COMPONENT, UNIT >.

Public Member Functions

 BBM_IMPORT_CONFIG (BSDF)
 
 sampledlossfunction (const BSDF &bsdf, const REFERENCE &reference, const SAMPLELOSSFUNC &samplelossfunc, const LINEARIZER &linearizer)
 Constructor.
 
void update (void)
 Init (does nothing)
 
Size_t samples (void) const
 Returns the number of samples.
 
Value operator() (Size_t idx, Mask mask=true) const
 Compute the loss over the idx-th sample.
 
Value operator() (Mask mask=true) const
 Compute loss over all samples.
 

Private Attributes

const BSDF & _bsdf
 
const REFERENCE & _reference
 
LINEARIZER _linearizer
 
SAMPLELOSSFUNC _samplelossfunc
 

Detailed Description

template<typename BSDF, typename REFERENCE, typename SAMPLELOSSFUNC, typename LINEARIZER, bsdf_flag COMPONENT = bsdf_flag::All, unit_t UNIT = unit_t::Radiance>
requires concepts::bsdfmodel<BSDF> && concepts::bsdfmodel<REFERENCE> && concepts::inout_linearizer<LINEARIZER> && concepts::samplelossfunction<SAMPLELOSSFUNC> && concepts::matching_config<BSDF, REFERENCE, LINEARIZER>
struct bbm::sampledlossfunction< BSDF, REFERENCE, SAMPLELOSSFUNC, LINEARIZER, COMPONENT, UNIT >

sampledlossfunction

Computes the loss over BSDFs sampled by a linearizer.

Satisfied: concepts::sampledlossfunction

Constructor & Destructor Documentation

◆ sampledlossfunction()

sampledlossfunction ( const BSDF &  bsdf,
const REFERENCE &  reference,
const SAMPLELOSSFUNC &  samplelossfunc,
const LINEARIZER &  linearizer 
)
inline

Constructor.

Parameters
bsdf= bsdf model to be optimized
reference= goal bsdf model
samplelossfunc= loss over a single loss sample
linearizer= linearizer to sample the bsdf models.

Member Function Documentation

◆ BBM_IMPORT_CONFIG()

BBM_IMPORT_CONFIG ( BSDF  )

◆ operator()() [1/2]

Value operator() ( Mask  mask = true) const
inline

Compute loss over all samples.

◆ operator()() [2/2]

Value operator() ( Size_t  idx,
Mask  mask = true 
) const
inline

Compute the loss over the idx-th sample.

◆ samples()

Size_t samples ( void  ) const
inline

Returns the number of samples.

◆ update()

void update ( void  )
inline

Init (does nothing)

Member Data Documentation

◆ _bsdf

const BSDF& _bsdf
private

◆ _linearizer

LINEARIZER _linearizer
private

◆ _reference

const REFERENCE& _reference
private

◆ _samplelossfunc

SAMPLELOSSFUNC _samplelossfunc
private

The documentation for this struct was generated from the following file: